diff options
-rw-r--r-- | Annex/Direct.hs | 7 | ||||
-rw-r--r-- | Annex/ReplaceFile.hs | 13 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/direct_command_leaves_repository_inconsistent_if_interrupted.mdwn | 2 | ||||
-rw-r--r-- | doc/devblog/day_216__various_minor_bugs.mdwn | 4 | ||||
-rw-r--r-- | doc/install.mdwn | 2 | ||||
-rw-r--r-- | doc/install/Linux_standalone.mdwn | 14 | ||||
-rw-r--r-- | doc/special_remotes/gcrypt.mdwn | 2 | ||||
-rwxr-xr-x | standalone/android/install-haskell-packages | 2 | ||||
-rwxr-xr-x | standalone/linux/install-haskell-packages | 15 |
11 files changed, 40 insertions, 28 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 374599369..7b91cc342 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -353,11 +353,8 @@ toDirectGen k f = do void $ addAssociatedFile k f modifyContent loc $ do thawContent loc - replaceFileOr f - (liftIO . moveFile loc) - $ \tmp -> do -- rollback - liftIO (moveFile tmp loc) - freezeContent loc + liftIO (replaceFileFrom loc f) + `catchIO` (\_ -> freezeContent loc) fromdirect loc = do replaceFile f $ liftIO . void . copyFileExternal loc diff --git a/Annex/ReplaceFile.hs b/Annex/ReplaceFile.hs index 8cb0cc6da..9700d4b60 100644 --- a/Annex/ReplaceFile.hs +++ b/Annex/ReplaceFile.hs @@ -39,7 +39,12 @@ replaceFileOr file action rollback = do return tmpfile go tmpfile = do action tmpfile - liftIO $ catchIO (rename tmpfile file) (fallback tmpfile) - fallback tmpfile _ = do - createDirectoryIfMissing True $ parentDir file - moveFile tmpfile file + liftIO $ replaceFileFrom tmpfile file + +replaceFileFrom :: FilePath -> FilePath -> IO () +replaceFileFrom src dest = go `catchIO` fallback + where + go = moveFile src dest + fallback _ = do + createDirectoryIfMissing True $ parentDir dest + go @@ -187,7 +187,8 @@ no-th-webapp-stage1: Build/EvilSplicer # Some additional dependencies needed by the expanded splices. sed -i 's/^ Build-Depends: / Build-Depends: yesod-routes, yesod-core, shakespeare-css, shakespeare-js, shakespeare, blaze-markup, file-embed, wai-app-static, /' tmp/no-th-tree/git-annex.cabal # Avoid warnings due to sometimes unused imports added for the splices. - sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports -XMagicHash /i' tmp/no-th-tree/git-annex.cabal + sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports /i' tmp/no-th-tree/git-annex.cabal + sed -i 's/Extensions: /Extensions: MagicHash /i' tmp/no-th-tree/git-annex.cabal # Run on the arm system, after stage1 no-th-webapp-stage2: @@ -216,7 +217,8 @@ android: Build/EvilSplicer # Some additional dependencies needed by the expanded splices. sed -i 's/^ Build-Depends: / Build-Depends: yesod-routes, yesod-core, shakespeare-css, shakespeare-js, shakespeare, blaze-markup, file-embed, wai-app-static, /' tmp/androidtree/git-annex.cabal # Avoid warnings due to sometimes unused imports added for the splices. - sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports -XMagicHash /i' tmp/androidtree/git-annex.cabal + sed -i 's/GHC-Options: \(.*\)-Wall/GHC-Options: \1-Wall -fno-warn-unused-imports /i' tmp/androidtree/git-annex.cabal + sed -i 's/Extensions: /Extensions: MagicHash /i' tmp/no-th-tree/git-annex.cabal # Cabal cannot cross compile with custom build type, so workaround. sed -i 's/Build-type: Custom/Build-type: Simple/' tmp/androidtree/git-annex.cabal # Build just once, but link twice, for 2 different versions of Android. diff --git a/debian/changelog b/debian/changelog index b1d53a841..eaa36b362 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,7 @@ git-annex (5.20140718) UNRELEASED; urgency=medium subdirectory in the key name. * S3, Glacier, WebDAV: Fix bug that prevented accessing the creds when the repository was configured with encryption=shared embedcreds=yes. + * direct: Avoid leaving file content in misctemp if interrupted. -- Joey Hess <joeyh@debian.org> Mon, 21 Jul 2014 14:41:26 -0400 diff --git a/doc/bugs/direct_command_leaves_repository_inconsistent_if_interrupted.mdwn b/doc/bugs/direct_command_leaves_repository_inconsistent_if_interrupted.mdwn index 0d81c6778..c19db9727 100644 --- a/doc/bugs/direct_command_leaves_repository_inconsistent_if_interrupted.mdwn +++ b/doc/bugs/direct_command_leaves_repository_inconsistent_if_interrupted.mdwn @@ -41,3 +41,5 @@ Similar issues and discussions: * [[forum/Cleaning_up_after_aborted_sync_in_direct_mode/]] * [[bugs/failure_to_return_to_indirect_mode_on_usb/]] * [[forum/git-status_typechange_in_direct_mode/]] + +[[!meta title="git annex lock --force deletes only copy of content after interrupted switch to direct mode"] diff --git a/doc/devblog/day_216__various_minor_bugs.mdwn b/doc/devblog/day_216__various_minor_bugs.mdwn index 329b32933..0531ddb04 100644 --- a/doc/devblog/day_216__various_minor_bugs.mdwn +++ b/doc/devblog/day_216__various_minor_bugs.mdwn @@ -1,8 +1,8 @@ Working on getting caught up with backlog. 73 messages remain. Several minor bugs were fixed today. All edge cases. The most edge case one -of all, I could not fix: git-annex cannot add a file that has a space in its -filename, because `git cat-file --batch`'s interface does not support such +of all, I could not fix: git-annex cannot add a file that has a space^Wnewline +in its filename, because `git cat-file --batch`'s interface does not support such filenames. Added a page [[documenting how verify the signatures of git-annex releases|install/verifying_downloads]]. diff --git a/doc/install.mdwn b/doc/install.mdwn index f149b4fae..0d8bb1d1e 100644 --- a/doc/install.mdwn +++ b/doc/install.mdwn @@ -16,7 +16,7 @@ detailed instructions | quick install [[ScientificLinux5]] | [[openSUSE]] | [[Docker]] | -[[Windows]] | [download installer](http://downloads.kitenet.net/git-annex/windows/current/) **alpha** +[[Windows]] | [download installer](http://downloads.kitenet.net/git-annex/windows/current/) **beta** """]] All the downloads above use https for security. For added security, see diff --git a/doc/install/Linux_standalone.mdwn b/doc/install/Linux_standalone.mdwn index 4e654febc..f7aca5b9a 100644 --- a/doc/install/Linux_standalone.mdwn +++ b/doc/install/Linux_standalone.mdwn @@ -5,9 +5,9 @@ prebuilt tarball of the most recent release. This tarball should work on most Linux systems. It has basically no dependencies and is self-contained. -* i386: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-i386.tar.gz) -* amd64: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz) -* armel: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-armel.tar.gz) +* x86-32: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-i386.tar.gz) +* x86-64: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz) +* arm: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-armel.tar.gz) To use, just unpack the tarball, `cd git-annex.linux` and run `./runshell` -- this sets up an environment where you can use `git annex`, as well @@ -18,7 +18,7 @@ Alternatively, you can unpack the tarball, and add the directory to your PATH. This lets you use `git annex`, without overriding your system's own versions of git, etc. -The armel version can be installed on NAS devices and other embedded ARM +The arm version can be installed on NAS devices and other embedded ARM linux systems. * [[tips/Synology_NAS_and_git_annex]] @@ -29,6 +29,6 @@ linux systems. A daily build is also available, thanks to Mesar Hameed and the University of Bath CS department. -* i386: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/i386/git-annex-standalone-i386.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/i386/)) -* amd64: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/amd64/git-annex-standalone-amd64.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/amd64/)) -* armel: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/armel/git-annex-standalone-armel.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/armel/)) +* x86-32: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/i386/git-annex-standalone-i386.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/i386/)) +* x86-64: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/amd64/git-annex-standalone-amd64.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/amd64/)) +* arm: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/armel/git-annex-standalone-armel.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/armel/)) diff --git a/doc/special_remotes/gcrypt.mdwn b/doc/special_remotes/gcrypt.mdwn index c9a22b01a..d5f3f7b5b 100644 --- a/doc/special_remotes/gcrypt.mdwn +++ b/doc/special_remotes/gcrypt.mdwn @@ -46,7 +46,7 @@ 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 +Recent versions of git-annex configure `remote.<name>`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. diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index df870b96f..a7ebbc115 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -4,7 +4,7 @@ # # You should install ghc-android first. # -# Note that the newest version of packages is installed. +# Note that the newest version of packages are installed. # It attempts to reuse patches for older versions, but # new versions of packages often break cross-compilation by adding TH, # etc diff --git a/standalone/linux/install-haskell-packages b/standalone/linux/install-haskell-packages index a8103b386..f5fd4edfa 100755 --- a/standalone/linux/install-haskell-packages +++ b/standalone/linux/install-haskell-packages @@ -3,7 +3,7 @@ # to all the necessary haskell packages being installed, with the # necessary patches to work on architectures that lack template haskell. # -# Note that the newest version of packages is installed. +# Note that the newest version of packages are installed. # It attempts to reuse patches for older versions, but # new versions of packages often break cross-compilation by adding TH, # etc @@ -20,14 +20,15 @@ fi cabalopts="$@" cabalinstall () { - echo cabal install "$@" "$cabalopts" - eval cabal install "$@" "$cabalopts" + echo cabal install -j1 "$@" "$cabalopts" + eval cabal install -j1 "$@" "$cabalopts" } patched () { pkg=$1 shift 1 - cabal unpack $pkg + cabal unpack $pkg$1 + shift 1 cd $pkg* git init git config user.name dummy @@ -74,7 +75,11 @@ install_pkgs () { patched yesod-core patched persistent patched persistent-template - patched file-embed + # Newer versions of file-embed cause ghc -ddump-splices + # to output invalid character codes. + # Note that the system generating the splices should also + # use this version of file-embed. + patched file-embed -0.0.6 patched process-conduit patched yesod-static patched yesod-persistent |