From aa0ceb6c5c66cfeb0c90f024cc3f66f6d69be1cd Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Thu, 2 Sep 2021 00:38:53 +0300 Subject: [PATCH] cmd/version: add support for openbsd/386 After this patch the version command will be fully supported on openbsd/amd64 and openbsd/386. Remaining os/arch combinations stay as is. --- go.mod | 4 +--- go.sum | 10 ++++------ lib/buildinfo/osversion.go | 1 - lib/buildinfo/osversion_openbsd_386.go | 17 ----------------- 4 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 lib/buildinfo/osversion_openbsd_386.go diff --git a/go.mod b/go.mod index 15384e694..33c55e97d 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8 github.com/rfjakob/eme v1.1.2 github.com/sevlyar/go-daemon v0.1.5 - github.com/shirou/gopsutil/v3 v3.21.7 + github.com/shirou/gopsutil/v3 v3.21.8 github.com/sirupsen/logrus v1.8.1 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spacemonkeygo/monkit/v3 v3.0.15 // indirect @@ -64,8 +64,6 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/t3rm1n4l/go-mega v0.0.0-20200416171014-ffad7fcb44b8 - github.com/tklauser/go-sysconf v0.3.8 // indirect - github.com/tklauser/numcpus v0.3.0 // indirect github.com/xanzy/ssh-agent v0.3.1 github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a github.com/yunify/qingstor-sdk-go/v3 v3.2.0 diff --git a/go.sum b/go.sum index f27a48b38..6a112774c 100644 --- a/go.sum +++ b/go.sum @@ -548,8 +548,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+Qk= github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE= -github.com/shirou/gopsutil/v3 v3.21.7 h1:PnTqQamUjwEDSgn+nBGu0qSDV/CfvyiR/gwTH3i7HTU= -github.com/shirou/gopsutil/v3 v3.21.7/go.mod h1:RGl11Y7XMTQPmHh8F0ayC6haKNBgH4PXMJuTAcMOlz4= +github.com/shirou/gopsutil/v3 v3.21.8 h1:nKct+uP0TV8DjjNiHanKf8SAuub+GNsbrOtM9Nl9biA= +github.com/shirou/gopsutil/v3 v3.21.8/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= @@ -622,10 +622,8 @@ github.com/t3rm1n4l/go-mega v0.0.0-20200416171014-ffad7fcb44b8 h1:IGJQmLBLYBdAkn github.com/t3rm1n4l/go-mega v0.0.0-20200416171014-ffad7fcb44b8/go.mod h1:XWL4vDyd3JKmJx+hZWUVgCNmmhZ2dTBcaNDcxH465s0= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= -github.com/tklauser/go-sysconf v0.3.8 h1:41Nq9J+pxKud4IQ830J5LlS5nl67dVQC7AuisUooaOU= -github.com/tklauser/go-sysconf v0.3.8/go.mod h1:z4zYWRS+X53WUKtBcmDg1comV3fPhdQnzasnIHUoLDU= -github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= +github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= +github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ= diff --git a/lib/buildinfo/osversion.go b/lib/buildinfo/osversion.go index 7cc8157a1..8090f419a 100644 --- a/lib/buildinfo/osversion.go +++ b/lib/buildinfo/osversion.go @@ -1,5 +1,4 @@ // +build !windows -// +build !openbsd !386 package buildinfo diff --git a/lib/buildinfo/osversion_openbsd_386.go b/lib/buildinfo/osversion_openbsd_386.go deleted file mode 100644 index 2ebad6ed9..000000000 --- a/lib/buildinfo/osversion_openbsd_386.go +++ /dev/null @@ -1,17 +0,0 @@ -package buildinfo - -// Skip building GetOSVersion on openbsd/386 because dependency -// https://github.com/shirou/gopsutil v3.21.6 fails to build on openbsd/386: -// -// Error: ../../../../go/pkg/mod/github.com/tklauser/go-sysconf@v0.3.6/sysconf_openbsd.go:22:28: undefined: unix.RLIMIT_NPROC -// -// Resolution pending on issues which can be resolved after go 1.17: -// - https://github.com/tklauser/go-sysconf/issues/21 -// - https://golang.org/cl/341069 -// -// Support for openbsd/386 can be restored after we deprecate go 1.17 - -// GetOSVersion on openbsd/386 returns stub OS version, kernel, bitness -func GetOSVersion() (osVersion, osKernel string) { - return "OpenBSD/i386", "" -}