Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2020-04-01 10:28:03 -04:00
commit 9cb6c4b189
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 211 additions and 2 deletions

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="vinicius.vin@6d4d58c59c394cd744d469c9d7c41e264331dfcd"
nickname="vinicius.vin"
avatar="http://cdn.libravatar.org/avatar/b332bfc1d3f49c196e1bff84b53d0f8b"
subject="comment 7"
date="2020-03-30T21:02:52Z"
content="""
Thanks, Ilya.
I will wait for the major upgrade of my distro to migrate to git-annex 8.
For now, I just updated git-annex to 7.20191024, where I can get back the ``git add`` behavior without update all the dependency chain.
"""]]

View file

@ -0,0 +1,133 @@
### Please describe the problem.
git-annex denies dropping a file because it be required, but `required` = `groupwanted` and `groupwanted` = `nothing`.
It seems that this is regardless of the value of `groupwanted`. I also tried with other expressions.
### What steps will reproduce the problem?
[[!format sh """
#!/bin/sh
set -x
# init repos & add file
mkdir local remote
cd remote
git init && git annex init remote
cd ../local
git init && git annex init local
touch file
ls
git annex add .
git remote add remote ../remote
# repo settings
git annex group remote g
git annex groupwanted g nothing
git annex required remote groupwanted
# test
git annex whereis file
git annex copy file --to=remote --auto # doesn't copy, as expected
git annex whereis file
git annex copy file --to=remote # copies, as expected
git annex whereis file
git annex drop file --from=remote # ERROR: drop denied
git annex whereis file
# test using required=nothing directly
git annex required remote nothing
git annex drop file --from=remote # drops, as expected
git annex whereis file
"""]]
### What version of git-annex are you using? On what operating system?
* version 7.20190819 on NixOS 19.09 as well as version 8.20200309 from unstable Nixpkgs
* local repository version: 7 (makes no difference whether 5 or 7)
### Please provide any additional information below.
[[!format sh """
# transcript
[user@host annex-test]$ mkdir local remote
[user@host annex-test]$ cd remote
[user@host remote]$ git init
Initialized empty Git repository in /home/johannes/annex-test/remote/.git/
[user@host remote]$ git annex init remote
init remote ok
(recording state in git...)
[user@host remote]$ cd ../local
[user@host local]$ git init
Initialized empty Git repository in /home/johannes/annex-test/local/.git/
[user@host local]$ git annex init local
init local ok
(recording state in git...)
[user@host local]$ touch file
[user@host local]$ ls
file
[user@host local]$ git annex add .
add file
ok
(recording state in git...)
[user@host local]$ git remote add remote ../remote
[user@host local]$ git annex group remote g
group remote ok
(recording state in git...)
[user@host local]$ git annex groupwanted g nothing
groupwanted g ok
(recording state in git...)
[user@host local]$ git annex required remote groupwanted
required remote ok
(recording state in git...)
[user@host local]$ git annex whereis file
whereis file (1 copy)
a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here]
ok
[user@host local]$ git annex copy file --to=remote --auto
[user@host local]$ git annex whereis file
whereis file (1 copy)
a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here]
ok
[user@host local]$ git annex copy file --to=remote
copy file (to remote...) (checksum...) ok
(recording state in git...)
[user@host local]$ git annex whereis file
whereis file (2 copies)
343d87b7-e21a-4f38-b9b6-66b01aaa7995 -- remote
a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here]
ok
[user@host local]$ git annex drop file --from=remote
drop remote file
That file is required content, it cannot be dropped!
(Use --force to override this check, or adjust required content configuration.)
failed
git-annex: drop: 1 failed
[user@host local]$ git annex whereis file
whereis file (2 copies)
343d87b7-e21a-4f38-b9b6-66b01aaa7995 -- remote
a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here]
ok
[user@host local]$ git annex required remote nothing
required remote ok
(recording state in git...)
[user@host local]$ git annex drop file --from=remote
drop remote file ok
(recording state in git...)
[user@host local]$ git annex whereis file
whereis file (1 copy)
a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here]
ok
# End of transcript or log.
"""]]
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
I had, some time ago I synced my phone with it. I stopped because of the painful crippled file system there, and the annex was so large that the phone was slow. But I always wanted to restart annexing, to archive and partially checkout my libraries, and maybe do the phone sync right (probably via a special remote)! It seems to be THE tool as soon as a repo is split over multiple disks.

View file

@ -0,0 +1,23 @@
[[!comment format=mdwn
username="yarikoptic"
avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4"
subject="comment 3"
date="2020-03-31T01:22:53Z"
content="""
Thank you Joey!
TL;DR: If you don't manage to reproduce it with the call below -- let's consider the issue doesn't exist ;) at least I found a workaround.
if you would like to try, after `apt-get install singularity-container`:
```
git clone git://github.com/datalad/datalad-extensions -b enh-git-annex && cd datalad-extensions && scripts/ci/build_git_annex build
```
(it might ask for a passkey to your gpg at some point - building signed pkgs) -- it might or might not fail for you!
Ghosts: it fails if I just run `scripts/ci/build_git_annex build` in my original local git repository. If, instead of `build/` I am providing some path outside of current directory (i.e. not just `build`) when I am under $HOME -- it seems to work. So I started to build out under /tmp/git-annex and github actions seems to pass now!: https://github.com/datalad/datalad-extensions/runs/547292760?check_suite_focus=true
But it also passes for me when I do above like under `/tmp/` , or when I provide build directory still somewhere in my home, e.g. `~/build`.
I think it is some singularity bind mounts madness somehow interfering.
"""]]

View file

@ -0,0 +1,23 @@
[[!comment format=mdwn
username="https://openid.jorsn.eu/"
avatar="http://cdn.libravatar.org/avatar/250999e054ac1e0c82a45d8b5dcfad69ec611f16216b7c1df36a3df1d715aa37"
subject="automatic repository upgrades"
date="2020-03-30T23:24:51Z"
content="""
Hi Joey,
I really like git-annex but there is one thing which annoys me and friends of mine: Automatic repo upgrades.
I just installed the newer version as an unstable package from my distro[^1] for a test and noticed afterwards that git-annex v7[^2] doesn't work anymore.
This is something I would like to be warned about in advance; it's nothing I would expect. Imagine a repo shared between people. One of them gets a new version of git-annex installed by the system admin, thus converting the repo accidentally, without even noticing. The others will be happy.
So please document `annex.autoupgraderepository` in the man page and set it to `false` by default.
Stay happy and healthy,
Johannes
[^1]: so didn't read the news first
[^2]: the stable distro package
"""]]

View file

@ -40,7 +40,7 @@ Here are specific instructions for using git-annex with various services:
* [[Dropbox|tips/dropboxannex]]
* [[FTP|rclone]]
* [[Flickr|tips/flickrannex]]
* [Freenet](https://github.com/xloem/gitlakepy)
* [Freenet and Siacoin Skynet](https://github.com/xloem/gitlakepy)
* [[Google Cloud Storage|tips/using_Google_Cloud_Storage]]
* [[Google Drive|tips/using_Google_Drive]]
* [[hubiC|tips/using_Hubic]]

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="thk"
avatar="http://cdn.libravatar.org/avatar/bfef10a428769701aeee1db978951461"
subject="Also problem with USB drives"
date="2020-03-31T06:36:12Z"
content="""
With a git annex repo on an USB drive and a linux filesystem (e.g. ext4) one often has the problem that users on different machines have different user ids. Thus one always needs to correct the user (chown) or permissions (chmod) before one can write to that repo.
So it would help a lot, if git-annex would respect gits config setting \"core.sharedrepository\".
From what I can see, the SUID bit seems to work at least. I use the group \"floppy\" as owner group for my USB drive repos since its group id is the same on all Debian machines and there is no harm to add users to it.
"""]]

View file

@ -1,7 +1,7 @@
I'm thk at debian org
My TODO items
# My TODO items
- write a tip on using git worktree to inspect the git-annex branch
- Is there a way to filter out the directories?
@ -17,3 +17,10 @@ My TODO items
- more experiences with ext4 encryption feature:
<https://www.techort.com/encryption-in-ext4-how-it-works-habrahabr/>
# Bugs that affect me
- [[todo/sharedRepository_mode_not_supported_by_git-annex]] - some pain
- [[tips/shared_git_annex_directory_between_multiple_users]]
- [[todo/support_concurrency_for_export]] (maybe nice?)
- [[todo/more_efficient_resolution_of_trivial_export_conflicts]] - endless pain!