1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
The Debian packaging of git-annex is maintained in git, using the
merging workflow described in dgit-maint-merge(7). There isn't a
patch queue that can be represented as a quilt series.
A detailed breakdown of the changes is available from their canonical
representation - git commits in the packaging repository. For
example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:
% git clone https://git.dgit.debian.org/git-annex
% cd git-annex
% git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'
(If you have dgit, use `dgit clone git-annex`, rather than plain `git
clone`.)
A single combined diff, containing all the changes, follows.
--- git-annex-10.20230126.orig/COPYRIGHT
+++ git-annex-10.20230126/COPYRIGHT
@@ -64,6 +64,10 @@ License: GPL-2
The full text of version 2 of the GPL is distributed in
/usr/share/common-licenses/GPL-2 on Debian systems.
+Files: Annex/DirHashes.hs
+Copyright: © 2010-2017 Joey Hess <id@joeyh.name>
+License: GPL-3+
+
Files: doc/tips/automatically_adding_metadata/pre-commit-annex
Copyright: 2014 Joey Hess <id@joeyh.name>
2016 Klaus Ethgen <Klaus@Ethgen.ch>
@@ -73,9 +77,6 @@ Files: static/jquery*
Copyright: © 2005-2011 by John Resig, Branden Aaron & Jörn Zaefferer
© 2011 The Dojo Foundation
License: Expat or GPL-2
- The full text of version 2 of the GPL is distributed in
- /usr/share/common-licenses/GPL-2 on Debian systems. The text of the Expat
- license is in the Expat section below.
Files: static/*/bootstrap* static/*/glyphicons-halflings*
Copyright: 2012-2014 Twitter, Inc.
@@ -105,6 +106,10 @@ License: GPL-3+
this package's source, or in /usr/share/common-licenses/GPL-3 on
Debian systems.
+License: GPL-2
+ The full text of version 2 of the GPL is distributed in
+ /usr/share/common-licenses/GPL-2 on Debian systems.
+
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
--- git-annex-10.20230126.orig/Remote/External.hs
+++ git-annex-10.20230126/Remote/External.hs
@@ -377,19 +377,27 @@ handleRequest external req mp responseha
handleRequest' st external req mp responsehandler
handleRequestKey :: External -> (SafeKey -> Request) -> Key -> Maybe MeterUpdate -> ResponseHandler a -> Annex a
-handleRequestKey external mkreq k mp responsehandler = case mkSafeKey k of
- Right sk -> handleRequest external (mkreq sk) mp responsehandler
+handleRequestKey external mkreq k mp responsehandler =
+ withSafeKey k $ \sk -> handleRequest external (mkreq sk) mp responsehandler
+
+withSafeKey :: Key -> (SafeKey -> Annex a) -> Annex a
+withSafeKey k a = case mkSafeKey k of
+ Right sk -> a sk
Left e -> giveup e
{- Export location is first sent in an EXPORT message before
- the main request. This is done because the ExportLocation can
- contain spaces etc. -}
handleRequestExport :: External -> ExportLocation -> (SafeKey -> Request) -> Key -> Maybe MeterUpdate -> ResponseHandler a -> Annex a
-handleRequestExport external loc mkreq k mp responsehandler = do
- withExternalState external $ \st -> do
- checkPrepared st external
- sendMessage st (EXPORT loc)
- handleRequestKey external mkreq k mp responsehandler
+handleRequestExport external loc mkreq k mp responsehandler =
+ withSafeKey k $ \sk ->
+ -- Both the EXPORT and subsequent request must be sent to the
+ -- same external process, so run both with the same external
+ -- state.
+ withExternalState external $ \st -> do
+ checkPrepared st external
+ sendMessage st (EXPORT loc)
+ handleRequest' st external (mkreq sk) mp responsehandler
handleRequest' :: ExternalState -> External -> Request -> Maybe MeterUpdate -> ResponseHandler a -> Annex a
handleRequest' st external req mp responsehandler
--- git-annex-10.20230126.orig/Remote/External/Types.hs
+++ git-annex-10.20230126/Remote/External/Types.hs
@@ -415,7 +415,7 @@ newtype JobId = JobId Integer
deriving (Eq, Ord, Show)
supportedProtocolVersions :: [ProtocolVersion]
-supportedProtocolVersions = [1]
+supportedProtocolVersions = [1, 2]
instance Proto.Serializable JobId where
serialize (JobId n) = show n
--- git-annex-10.20230126.orig/doc/design/external_special_remote_protocol.mdwn
+++ git-annex-10.20230126/doc/design/external_special_remote_protocol.mdwn
@@ -39,7 +39,7 @@ empty, but the separating spaces are sti
The special remote is responsible for sending the first message, indicating
the version of the protocol it is using.
- VERSION 1
+ VERSION 2
Recent versions of git-annex respond with a message indicating
protocol extensions that it supports. Older versions of
@@ -271,7 +271,7 @@ These messages may be sent by the specia
handling a request.
* `VERSION Int`
- Supported protocol version. Current version is 1. Must be sent first
+ Supported protocol version. Current version is 2. Must be sent first
thing at startup, as until it sees this git-annex does not know how to
talk with the special remote program!
(git-annex does not send a reply to this message, but may give up if it
@@ -428,6 +428,18 @@ remote.
git-annex will not talk to it any further. If the program receives
an ERROR from git-annex, it can exit with its own ERROR.
+## protocol versions
+
+Currently git-annex supports `VERSION 1` and `VERSION 2`.
+The two protocol versions are actually identical.
+
+Old versions of git-annex that supported only `VERSION 1`
+had a bug in their implementation of the
+part of the protocol documented in the [[export_and_import_appendix]].
+The bug could result in ontent being exported to the wrong file.
+External special remotes that implement that should use `VERSION 2` to
+avoid talking to the buggy old version of git-annex.
+
## extensions
These protocol extensions are currently supported.
--- git-annex-10.20230126.orig/doc/special_remotes/external/example.sh
+++ git-annex-10.20230126/doc/special_remotes/external/example.sh
@@ -150,7 +150,7 @@ doremove () {
}
# This has to come first, to get the protocol started.
-echo VERSION 1
+echo VERSION 2
while read line; do
set -- $line
--- git-annex-10.20230126.orig/doc/special_remotes/external/git-annex-remote-ipfs
+++ git-annex-10.20230126/doc/special_remotes/external/git-annex-remote-ipfs
@@ -54,7 +54,7 @@ getaddrs () {
}
# This has to come first, to get the protocol started.
-echo VERSION 1
+echo VERSION 2
while read line; do
set -- $line
--- git-annex-10.20230126.orig/doc/special_remotes/external/git-annex-remote-torrent
+++ git-annex-10.20230126/doc/special_remotes/external/git-annex-remote-torrent
@@ -100,7 +100,7 @@ downloadtorrent () {
}
# This has to come first, to get the protocol started.
-echo VERSION 1
+echo VERSION 2
while read line; do
set -- $line
|