]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
Update golang.org/x/sys and remove OpenBSD workarounds
authorSimon Ruderich <simon@ruderich.org>
Tue, 8 Jun 2021 06:11:43 +0000 (08:11 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 8 Jun 2021 06:11:43 +0000 (08:11 +0200)
The latest version of golang.org/x/sys contains AT_REMOVEDIR also on
OpenBSD.

go.mod
go.sum
remote/sync/files.go
remote/sync/files_compat.go [deleted file]
remote/sync/files_compat_openbsd.go [deleted file]

diff --git a/go.mod b/go.mod
index cdfcef53331808b49939a2337933f0569a854cb3..d85dcad97384ee6f816f4d44f9f0d028659ed30e 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.16
 require (
        github.com/google/go-cmp v0.5.5
        github.com/ianbruene/go-difflib v1.2.0
-       golang.org/x/sys v0.0.0-20210324051608-47abb6519492 // indirect
+       golang.org/x/sys v0.0.0-20210608053332-aa57babbf139
        golang.org/x/term v0.0.0-20210317153231-de623e64d2a6
        gopkg.in/yaml.v2 v2.4.0
 )
diff --git a/go.sum b/go.sum
index 3a8b414859304ffbbbfee6c4cff629356be83ce6..5812c8131b004d5e91c55d81cbc8e13b58fe8fca 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -3,8 +3,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/ianbruene/go-difflib v1.2.0 h1:iARmgaCq6nW5QptdoFm0PYAyNGix3xw/xRgEwphJSZw=
 github.com/ianbruene/go-difflib v1.2.0/go.mod h1:uJbrQ06VPxjRiRIrync+E6VcWFGW2dWqw2gvQp6HQPY=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg=
-golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210608053332-aa57babbf139 h1:C+AwYEtBp/VQwoLntUmQ/yx3MS9vmZaKNdw5eOpoQe8=
+golang.org/x/sys v0.0.0-20210608053332-aa57babbf139/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20210317153231-de623e64d2a6 h1:EC6+IGYTjPpRfv9a2b/6Puw0W+hLtAhkV1tPsXhutqs=
 golang.org/x/term v0.0.0-20210317153231-de623e64d2a6/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
index e110b526011f577815ecbb9660a792f104743bef..2c8b70468a55bb3f627c620db06c370f591d502e 100644 (file)
@@ -324,7 +324,7 @@ reopen:
                err := unix.Unlinkat(parentFd, baseName, 0)
                if err != nil && !os.IsNotExist(err) {
                        err2 := unix.Unlinkat(parentFd, baseName,
-                               AT_REMOVEDIR)
+                               unix.AT_REMOVEDIR)
                        if err2 != nil && !os.IsNotExist(err2) {
                                // See src/os/file_unix.go in Go's sources
                                if err2 == unix.ENOTDIR {
diff --git a/remote/sync/files_compat.go b/remote/sync/files_compat.go
deleted file mode 100644 (file)
index b293148..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// MsgSyncReq: copy files to the remote host; compatibility
-
-// Copyright (C) 2021  Simon Ruderich
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-// +build !openbsd,!windows
-
-package sync
-
-import (
-       "golang.org/x/sys/unix"
-)
-
-const AT_REMOVEDIR = unix.AT_REMOVEDIR
diff --git a/remote/sync/files_compat_openbsd.go b/remote/sync/files_compat_openbsd.go
deleted file mode 100644 (file)
index f684883..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// MsgSyncReq: copy files to the remote host; OpenBSD compatibility
-
-// Copyright (C) 2021  Simon Ruderich
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-// +build openbsd
-
-package sync
-
-// Currently not defined in golang.org/x/sys/unix, see also
-// https://github.com/golang/go/issues/46342
-//
-// From /usr/include/fcntl.h
-const AT_REMOVEDIR = 0x08