pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
minio: add NetBSD support (from upstream pull req)
Module Name: pkgsrc-wip
Committed By: Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By: tnn
Date: Fri Aug 14 12:03:53 2020 +0200
Changeset: f4a79c7e5e8b08b03af62905725e7460d6f69fc7
Modified Files:
minio/distinfo
Added Files:
minio/patches/patch-pkg_disk_stat__fallback.go
minio/patches/patch-pkg_disk_stat__netbsd.go
Log Message:
minio: add NetBSD support (from upstream pull req)
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f4a79c7e5e8b08b03af62905725e7460d6f69fc7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
minio/distinfo | 2 ++
minio/patches/patch-pkg_disk_stat__fallback.go | 31 +++++++++++++++++
minio/patches/patch-pkg_disk_stat__netbsd.go | 47 ++++++++++++++++++++++++++
3 files changed, 80 insertions(+)
diffs:
diff --git a/minio/distinfo b/minio/distinfo
index f29d308c46..e534dce0eb 100644
--- a/minio/distinfo
+++ b/minio/distinfo
@@ -2293,3 +2293,5 @@ RMD160 (sigs.k8s.io_yaml_@v_v1.1.0.mod) = b062175dc1ba92e8c5a80661fa0e953f8b16ce
SHA512 (sigs.k8s.io_yaml_@v_v1.1.0.mod) = 78f6402daccb04510f4ef35ee457ee13e4f447fba8e6aa33b4d32aa666e925861bf3b3f22c5ba9573871ec7e830f99e4caae0969724a54eadf40e6a7ed7931a0
Size (sigs.k8s.io_yaml_@v_v1.1.0.mod) = 24 bytes
SHA1 (patch-go.mod) = b3622e712e2903ef1d50052b77aa489529dacac7
+SHA1 (patch-pkg_disk_stat__fallback.go) = e11b4828f0cf31c349cd471f41b900dece37b125
+SHA1 (patch-pkg_disk_stat__netbsd.go) = cd53f62964bb9db08bb1dc174820f17fc6637d08
diff --git a/minio/patches/patch-pkg_disk_stat__fallback.go b/minio/patches/patch-pkg_disk_stat__fallback.go
new file mode 100644
index 0000000000..4e1f440507
--- /dev/null
+++ b/minio/patches/patch-pkg_disk_stat__fallback.go
@@ -0,0 +1,31 @@
+$NetBSD$
+
+https://github.com/minio/minio/pull/10257
+
+--- pkg/disk/stat_fallback.go.orig 2020-07-27 16:03:38.000000000 +0000
++++ pkg/disk/stat_fallback.go
+@@ -1,24 +0,0 @@
+-// +build netbsd
+-
+-/*
+- * MinIO Cloud Storage, (C) 2017 MinIO, Inc.
+- *
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-package disk
+-
+-// GetInfo returns total and free bytes available in a directory, e.g. `/`.
+-func GetInfo(path string) (info Info, err error) {
+- return Info{}, nil
+-}
diff --git a/minio/patches/patch-pkg_disk_stat__netbsd.go b/minio/patches/patch-pkg_disk_stat__netbsd.go
new file mode 100644
index 0000000000..12540d1fe7
--- /dev/null
+++ b/minio/patches/patch-pkg_disk_stat__netbsd.go
@@ -0,0 +1,47 @@
+$NetBSD$
+
+https://github.com/minio/minio/pull/10257
+
+--- pkg/disk/stat_netbsd.go.orig 2020-08-14 09:58:55.219409957 +0000
++++ pkg/disk/stat_netbsd.go
+@@ -0,0 +1,40 @@
++// +build netbsd
++
++/*
++ * MinIO Cloud Storage, (C) 2020 MinIO, Inc.
++ *
++ * Licensed under the Apache License, Version 2.0 (the "License");
++ * you may not use this file except in compliance with the License.
++ * You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++package disk
++
++import (
++ "golang.org/x/sys/unix"
++)
++
++// GetInfo returns total and free bytes available in a directory, e.g. `/`.
++func GetInfo(path string) (info Info, err error) {
++ s := unix.Statvfs_t{}
++ if err = unix.Statvfs(path, &s); err != nil {
++ return Info{}, err
++ }
++ reservedBlocks := uint64(s.Bfree) - uint64(s.Bavail)
++ info = Info{
++ Total: uint64(s.Frsize) * (uint64(s.Blocks) - reservedBlocks),
++ Free: uint64(s.Frsize) * uint64(s.Bavail),
++ Files: uint64(s.Files),
++ Ffree: uint64(s.Ffree),
++ FSType: string(s.Fstypename[:]),
++ }
++ return info, nil
++}
Home |
Main Index |
Thread Index |
Old Index