Skip to content

Commit

Permalink
Merge pull request #3628 from gum3ng/issue_3127
Browse files Browse the repository at this point in the history
[#issue 3127] Add xattr support for Solaris
  • Loading branch information
MichaelEischer committed Feb 17, 2022
2 parents fb4c5af + dd30083 commit 8df246d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 20 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/issue-3127
@@ -0,0 +1,7 @@
Enhancement: Add xattr support for Solaris

We added xattr support for the Solaris operating system. This enables restic
to support xattrs on Solaris.

https://github.com/restic/restic/issues/3127
https://github.com/restic/restic/pull/3628
2 changes: 2 additions & 0 deletions doc/020_installation.rst
Expand Up @@ -302,6 +302,8 @@ supply the target OS and platform via the command-line options like this
$ go run build.go --goos linux --goarch arm --goarm 6
$ go run build.go --goos solaris --goarch amd64
The resulting binary is statically linked and does not require any
libraries.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -22,7 +22,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/pkg/profile v1.6.0
github.com/pkg/sftp v1.13.2
github.com/pkg/xattr v0.4.3
github.com/pkg/xattr v0.4.5
github.com/restic/chunker v0.4.0
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -285,8 +285,8 @@ github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdL
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pkg/sftp v1.13.2 h1:taJnKntsWgU+qae21Rx52lIwndAdKrj0mfUNQsz1z4Q=
github.com/pkg/sftp v1.13.2/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK8=
github.com/pkg/xattr v0.4.3 h1:5Jx4GCg5ABtqWZH8WLzeI4fOtM1HyX4RBawuCoua1es=
github.com/pkg/xattr v0.4.3/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs=
github.com/pkg/xattr v0.4.5 h1:P5SvUc1T07cHLto76ESJ+/x5kexU7s9127iVoeEW/hs=
github.com/pkg/xattr v0.4.5/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
Expand Down
16 changes: 0 additions & 16 deletions internal/restic/node_solaris.go
Expand Up @@ -9,19 +9,3 @@ func (node Node) restoreSymlinkTimestamps(path string, utimes [2]syscall.Timespe
func (s statT) atim() syscall.Timespec { return s.Atim }
func (s statT) mtim() syscall.Timespec { return s.Mtim }
func (s statT) ctim() syscall.Timespec { return s.Ctim }

// Getxattr retrieves extended attribute data associated with path.
func Getxattr(path, name string) ([]byte, error) {
return nil, nil
}

// Listxattr retrieves a list of names of extended attributes associated with the
// given path in the file system.
func Listxattr(path string) ([]string, error) {
return nil, nil
}

// Setxattr associates name and data together as an attribute of path.
func Setxattr(path, name string, data []byte) error {
return nil
}
3 changes: 2 additions & 1 deletion internal/restic/node_xattr.go
@@ -1,4 +1,5 @@
// +build darwin freebsd linux
//go:build darwin || freebsd || linux || solaris
// +build darwin freebsd linux solaris

package restic

Expand Down

0 comments on commit 8df246d

Please sign in to comment.