Either use the golang-go package from bullseye-backports (the non backport version is too old) or just grab the latest compiler version from All releases - The Go Programming Language .
Then clone the git repository and checkout the branch from the PR. Afterwards run cd checked/out/restic/folder && go build ./cmd/restic after a few minutes there will be a new restic binary in the current folder.
I was able to test your PR and I’m happy to report your changes succeeded. Granted the test wasn’t extensive but it looks successful.
Here is a sample of my test:
Testing stock restic
restic version
restic 0.16.3 compiled with go1.21.6 on linux/amd64
restic -r /srv/dev-disk-by-uuid-06812e1a-0930-4e39-9ec3-39b9949d537c/Restic/test2/ backup /srv/remotemount/d/AI\ Images/
enter password for repository:
repository 684716d0 opened (version 2, compression level auto)
no parent snapshot found, will read all files
Fatal: unable to save snapshot: nodeFromFileInfo /srv/remotemount/d: xattr.list /srv/remotemount/d: permission denied
Testing PR#4668
./restic version
restic 0.16.3-dev (compiled manually) compiled with go1.21.6 on linux/amd64
./restic -r /srv/dev-disk-by-uuid-06812e1a-0930-4e39-9ec3-39b9949d537c/Restic/test2/ backup /srv/remotemount/d/AI\ Images/
enter password for repository:
repository 684716d0 opened (version 2, compression level auto)
no parent snapshot found, will read all files
[0:00] 0 index files loaded
is xattr.Error true
permission denied; 0xd; syscall.Errno
true false true
Files: 18 new, 0 changed, 0 unmodified
Dirs: 4 new, 0 changed, 0 unmodified
Added to the repository: 4.306 MiB (4.300 MiB stored)
processed 18 files, 4.298 MiB in 0:00
snapshot 21233ffe saved
Looking at Snapshot
./restic -r /srv/dev-disk-by-uuid-06812e1a-0930-4e39-9ec3-39b9949d537c/Restic/test2/ snapshots
enter password for repository:
repository 684716d0 opened (version 2, compression level auto)
ID Time Host Tags Paths
-----------------------------------------------------------------------------------
21233ffe 2024-01-31 23:40:28 omvh3 /srv/remotemount/d/AI Images
-----------------------------------------------------------------------------------
1 snapshots
Not sure where to go from here. If you need any more testing just ask.
Thanks a lot for testing. That information should be enough for me to finish the PR. It will probably take a few days/weeks until I get around to that.
Ok just going to document my steps as it took me way to long to figure out what I did last time so please excuse the verbosness of this response. It’s more notes for me than it is for you.
mkdir gitclones
git --version
git version 2.30.2
git clone https://github.com/restic/restic.git
cd restic
git fetch origin pull/4668/head:xattr
git switch xattr
Switched to branch 'xattr'
go build ./cmd/restic
[BUILDING]
./restic version
restic 0.16.4-dev (compiled manually) compiled with go1.21.6 on linux/amd64
restic version
restic 0.16.3 compiled with go1.21.6 on linux/amd64
restic -r /srv/dev-disk-by-uuid-********-0930-4e39-****-39b9949d537c/Restic/test3/ backup /srv/remotemount/d/Images/
enter password for repository:******
repository b345ca87 opened (version 2, compression level auto)
found 1 old cache directories in /srv/dev-disk-by-uuid-********-104a-4d4f-****-d48b2ebad690/Home/user1/.cache/restic, run `restic cache --cleanup` to remove them no parent snapshot found, will read all files
Fatal: unable to save snapshot: nodeFromFileInfo /srv/remotemount/d: xattr.list /srv/remotemount/d: permission denied
./restic -r /srv/dev-disk-by-uuid-********-0930-4e39-****-39b9949d537c/Restic/test3/ backup /srv/remotemount/d/Images/
enter password for repository:******
repository b345ca87 opened (version 2, compression level auto)
found 1 old cache directories in /srv/dev-disk-by-uuid-********-104a-4d4f-****-d48b2ebad690/Home/user1/.cache/restic, run `restic cache --cleanup` to remove them no parent snapshot found, will read all files
[0:00] 0 index files loaded
Files: 18 new, 0 changed, 0 unmodified
Dirs: 4 new, 0 changed, 0 unmodified
Added to the repository: 4.306 MiB (4.300 MiB stored)
processed 18 files, 4.298 MiB in 0:00
snapshot ca1fe132 saved
So I take this as a success?
If you need me to do anything happy to help. Sorry for the delay.
It will be part of restic 0.17.0, but that will still take some time, there’s still quite a bit left to do on the roadmap Restic 0.17 roadmap · GitHub .
The roadmap is currently largely focused on issues/PRs that were planned for the next release. I haven’t taken the time to add the flurry of small fixes there, and now it’s too late for that.