bugs/Tests v8 locked: rsync remote: FAILgit-annexhttp://git-annex.branchable.com/bugs/Tests_v8_locked__58___rsync_remote__58___FAIL/git-annexikiwiki2022-05-02T18:18:27Zcomment 1http://git-annex.branchable.com/bugs/Tests_v8_locked__58___rsync_remote__58___FAIL/comment_1_809ca8b986ccadbc3940cc795d1823e8/joey2022-05-02T17:01:44Z2022-05-02T16:53:13Z
<p>The failure message is:</p>
<pre><code> ./Test/Framework.hs:328:
able to modify annexed file's foo content
</code></pre>
<p>Apparently some change to rsync in 3.2.4 has messed
up something involving permissions.</p>
<p>See also another bug caused by the new rsync <a href="http://bugs.debian.org/1010397">http://bugs.debian.org/1010397</a></p>
comment 2http://git-annex.branchable.com/bugs/Tests_v8_locked__58___rsync_remote__58___FAIL/comment_2_0327663314d2a8b2f0cab7536fdaa6bd/joey2022-05-02T18:18:27Z2022-05-02T17:08:15Z
<p>Here is the bug in action:</p>
<pre><code>-r--r--r-- 1 joey joey 30 May 2 12:42 .git/annex/objects/Gj/8J/SHA256E-s30--3d65cafd9435fde3867a527d75ff8aea05a3632cb60574d45e0fc277f06c8a64/SHA256E-s30--3d65cafd9435fde3867a527d75ff8aea05a3632cb60574d45e0fc277f06c8a64
joey@darkstar:/tmp/x>git-annex copy --to foo
copy x (to foo...)
ok
joey@darkstar:/tmp/x>ls -l .git/annex/objects/Gj/8J/SHA256E-s30--3d65cafd9435fde3867a527d75ff8aea05a3632cb60574d45e0fc277f06c8a64/SHA256E-s30--3d65cafd9435fde3867a527d75ff8aea05a3632cb60574d45e0fc277f06c8a64
-rwxr--r-- 1 joey joey 30 May 2 12:42 .git/annex/objects/Gj/8J/SHA256E-s30--3d65cafd9435fde3867a527d75ff8aea05a3632cb60574d45e0fc277f06c8a64/SHA256E-s30--3d65cafd9435fde3867a527d75ff8aea05a3632cb60574d45e0fc277f06c8a64*
</code></pre>
<p>At first I thought this was rsync modifying the permissions of the source file.</p>
<p>But no... <a href="http://source.git-annex.branchable.com/?p=source.git;a=commitdiff;h=17b20a24502aee3bfc5683146c3899a233295aea">17b20a24502aee3bfc5683146c3899a233295aea</a>
changed how temp directories get cleaned up. removePathForcibly
is actually changing the permissions of the object file hard link
in the rsynctmp directory when deleting that directory. Which also
changes the permissions of the object file.</p>
<p>Filed a bug on removePathForcibly. <a href="https://github.com/haskell/directory/issues/135">https://github.com/haskell/directory/issues/135</a></p>
<p>I think this makes removePathForcibly unsuitable for general purpose
use in git-annex, because there are just too many ways for a hard link
to enter the picture. (Eg annex.thin, or even a user making their own
hard link that git-annex does not know about.)</p>
<p>So, I've reverted that commit, and put in a more
targeted fix for the problem it was addressing.</p>