diff --git a/www/minio-client/Makefile b/www/minio-client/Makefile index ed26383e810e..c314d699ef8b 100644 --- a/www/minio-client/Makefile +++ b/www/minio-client/Makefile @@ -2,6 +2,7 @@ PORTNAME= minio-client PORTVERSION= ${GH_TAGNAME:S/RELEASE.//:S/Z//:S/T/-/:S/-/./g} +PORTREVISION= 2 CATEGORIES= www MAINTAINER= jhixson@FreeBSD.org diff --git a/www/minio-client/files/patch-pkg_disk_stat__freebsd.go b/www/minio-client/files/patch-pkg_disk_stat__freebsd.go deleted file mode 100644 index ec883c6819c3..000000000000 --- a/www/minio-client/files/patch-pkg_disk_stat__freebsd.go +++ /dev/null @@ -1,68 +0,0 @@ ---- pkg/disk/stat_freebsd.go.orig 2020-02-24 22:16:58 UTC -+++ pkg/disk/stat_freebsd.go -@@ -0,0 +1,65 @@ -+// +build freebsd -+ -+/* -+ * MinIO Cloud Storage, (C) 2019-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 ( -+ "os/user" -+ "strconv" -+ "strings" -+ "syscall" -+) -+ -+// GetFileSystemAttrs return the file system attribute as string; containing mode, -+// uid, gid, uname, Gname, atime, mtime, ctime and md5 -+func GetFileSystemAttrs(file string) (string, error) { -+ st := syscall.Stat_t{} -+ err := syscall.Stat(file, &st) -+ if err != nil { -+ return "", err -+ } -+ -+ var fileAttr strings.Builder -+ fileAttr.WriteString("atime:") -+ fileAttr.WriteString(strconv.Itoa(int(st.Atimespec.Sec))) -+ fileAttr.WriteString("/ctime:") -+ fileAttr.WriteString(strconv.Itoa(int(st.Ctimespec.Sec))) -+ fileAttr.WriteString("/gid:") -+ fileAttr.WriteString(strconv.Itoa(int(st.Gid))) -+ -+ g, err := user.LookupGroupId(strconv.FormatUint(uint64(st.Gid), 10)) -+ if err == nil { -+ fileAttr.WriteString("/gname:") -+ fileAttr.WriteString(g.Name) -+ } -+ -+ fileAttr.WriteString("/mode:") -+ fileAttr.WriteString(strconv.Itoa(int(st.Mode))) -+ fileAttr.WriteString("/mtime:") -+ fileAttr.WriteString(strconv.Itoa(int(st.Mtimespec.Sec))) -+ fileAttr.WriteString("/uid:") -+ fileAttr.WriteString(strconv.Itoa(int(st.Uid))) -+ -+ u, err := user.LookupId(strconv.FormatUint(uint64(st.Uid), 10)) -+ if err == nil { -+ fileAttr.WriteString("/uname:") -+ fileAttr.WriteString(u.Username) -+ } -+ -+ return fileAttr.String(), nil -+}