mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
- Update to 1.9.2
This commit is contained in:
parent
da9cda306f
commit
15ea139977
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=533396
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= minikube
|
||||
PORTVERSION= 1.9.0
|
||||
PORTVERSION= 1.9.2
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= sysutils
|
||||
|
||||
@ -33,7 +33,7 @@ GH_TUPLE= \
|
||||
c4milo:gotoolkit:bcc06269efa9:c4milo_gotoolkit/vendor/github.com/c4milo/gotoolkit \
|
||||
cenkalti:backoff:v2.2.1:cenkalti_backoff/vendor/github.com/cenkalti/backoff \
|
||||
census-instrumentation:opencensus-go:v0.22.0:census_instrumentation_opencensus_go/vendor/go.opencensus.io \
|
||||
cheggaaa:pb:v3.0.1:cheggaaa_pb/vendor/github.com/cheggaaa/pb \
|
||||
cheggaaa:pb:v3.0.1:cheggaaa_pb_v3/vendor/github.com/cheggaaa/pb \
|
||||
cloudfoundry-attic:jibber_jabber:bcc4c8345a21:cloudfoundry_attic_jibber_jabber/vendor/github.com/cloudfoundry-attic/jibber_jabber \
|
||||
containerd:containerd:082f7e3aed57:containerd_containerd/vendor/github.com/containerd/containerd \
|
||||
cpuguy83:go-md2man:v1.0.10:cpuguy83_go_md2man/vendor/github.com/cpuguy83/go-md2man \
|
||||
@ -63,7 +63,7 @@ GH_TUPLE= \
|
||||
golang:oauth2:0f29369cfe45:golang_oauth2/vendor/golang.org/x/oauth2 \
|
||||
golang:protobuf:v1.3.2:golang_protobuf/vendor/github.com/golang/protobuf \
|
||||
golang:sync:cd5d95a43a6e:golang_sync/vendor/golang.org/x/sync \
|
||||
golang:sys:b09406accb47:golang_sys/vendor/golang.org/x/sys \
|
||||
golang:sys:9fbb57f87de9:golang_sys/vendor/golang.org/x/sys \
|
||||
golang:text:v0.3.2:golang_text/vendor/golang.org/x/text \
|
||||
golang:time:9d24e82272b4:golang_time/vendor/golang.org/x/time \
|
||||
google:go-cmp:v0.3.1:google_go_cmp/vendor/github.com/google/go-cmp \
|
||||
@ -73,7 +73,7 @@ GH_TUPLE= \
|
||||
google:go-querystring:v1.0.0:google_go_querystring/vendor/github.com/google/go-querystring \
|
||||
google:gofuzz:v1.0.0:google_gofuzz/vendor/github.com/google/gofuzz \
|
||||
google:uuid:v1.1.1:google_uuid/vendor/github.com/google/uuid \
|
||||
googleapis:gax-go:v2.0.5:googleapis_gax_go/vendor/github.com/googleapis/gax-go \
|
||||
googleapis:gax-go:v2.0.5:googleapis_gax_go_v2/vendor/github.com/googleapis/gax-go \
|
||||
googleapis:gnostic:v0.3.0:googleapis_gnostic/vendor/github.com/googleapis/gnostic \
|
||||
googleapis:google-api-go-client:v0.9.0:googleapis_google_api_go_client/vendor/google.golang.org/api \
|
||||
googleapis:google-cloud-go:v0.45.1:googleapis_google_cloud_go/vendor/cloud.google.com/go \
|
||||
@ -96,6 +96,7 @@ GH_TUPLE= \
|
||||
juju:mutex:d21b13acf4bf:juju_mutex/vendor/github.com/juju/mutex \
|
||||
kballard:go-shellquote:95032a82bc51:kballard_go_shellquote/vendor/github.com/kballard/go-shellquote \
|
||||
konsorten:go-windows-terminal-sequences:v1.0.2:konsorten_go_windows_terminal_sequences/vendor/github.com/konsorten/go-windows-terminal-sequences \
|
||||
kubernetes-sigs:sig-storage-lib-external-provisioner:v4.0.0:kubernetes_sigs_sig_storage_lib_external_provisioner/vendor/sigs.k8s.io/sig-storage-lib-external-provisioner \
|
||||
kubernetes-sigs:yaml:v1.1.0:kubernetes_sigs_yaml/vendor/sigs.k8s.io/yaml \
|
||||
kubernetes:api:v0.17.3:kubernetes_api/vendor/k8s.io/api \
|
||||
kubernetes:apimachinery:v0.17.3:kubernetes_apimachinery/vendor/k8s.io/apimachinery \
|
||||
@ -156,8 +157,7 @@ GH_TUPLE= \
|
||||
xeipuuv:gojsonpointer:4e3ac2762d5f:xeipuuv_gojsonpointer/vendor/github.com/xeipuuv/gojsonpointer \
|
||||
xeipuuv:gojsonreference:bd5ef7bd5415:xeipuuv_gojsonreference/vendor/github.com/xeipuuv/gojsonreference \
|
||||
xeipuuv:gojsonschema:1d523034197f:xeipuuv_gojsonschema/vendor/github.com/xeipuuv/gojsonschema \
|
||||
zchee:go-vmnet:97ebf9174097:zchee_go_vmnet/vendor/github.com/zchee/go-vmnet \
|
||||
kubernetes-sigs:sig-storage-lib-external-provisioner:v4.0.0:kubernetes_sigs_sig_storage_lib_external_provisioner/vendor/sigs.k8s.io/sig-storage-lib-external-provisioner
|
||||
zchee:go-vmnet:97ebf9174097:zchee_go_vmnet/vendor/github.com/zchee/go-vmnet
|
||||
|
||||
GO_TARGET= ./cmd/${PORTNAME}
|
||||
GO_BUILDFLAGS= -ldflags="-X k8s.io/minikube/pkg/version.version=v${PORTVERSION} \
|
||||
@ -169,10 +169,6 @@ PLIST_FILES= bin/${PORTNAME}
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
post-patch:
|
||||
cd ${WRKSRC}/pkg/minikube/tunnel && \
|
||||
${LN} -s route_darwin.go route_freebsd.go
|
||||
cd ${WRKSRC}/third_party/go9p && \
|
||||
${LN} -s srv_pipe_linux.go srv_pipe_freebsd.go
|
||||
cd ${WRKSRC}/vendor/github.com/pkg/browser && \
|
||||
${LN} -s browser_linux.go browser_freebsd.go
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
TIMESTAMP = 1585512600
|
||||
SHA256 (kubernetes-minikube-v1.9.0_GH0.tar.gz) = 8ebc9b24bc9972b0d976d3bbf52b7da4940c05ad5554b248988e8241e605ab61
|
||||
SIZE (kubernetes-minikube-v1.9.0_GH0.tar.gz) = 78599221
|
||||
TIMESTAMP = 1588192836
|
||||
SHA256 (kubernetes-minikube-v1.9.2_GH0.tar.gz) = f94465221ad1f402e18b3ecd701c12a50d23e841a80de26c7861e3ddc86f2075
|
||||
SIZE (kubernetes-minikube-v1.9.2_GH0.tar.gz) = 78618859
|
||||
SHA256 (Azure-go-ansiterm-d6e3b3328b78_GH0.tar.gz) = ee1ebe2efef498be1c558bf71e143289db2d21e2d42592503ad2d4a989006821
|
||||
SIZE (Azure-go-ansiterm-d6e3b3328b78_GH0.tar.gz) = 20946
|
||||
SHA256 (MakeNowJust-heredoc-bb23615498cd_GH0.tar.gz) = be00f2aedeb443f9768f767b44e3ceab6d68ce6d45cb00468c61d5fcaff3823a
|
||||
@ -89,8 +89,8 @@ SHA256 (golang-protobuf-v1.3.2_GH0.tar.gz) = c9cda622857a17cf0877c5ba76688a93188
|
||||
SIZE (golang-protobuf-v1.3.2_GH0.tar.gz) = 312285
|
||||
SHA256 (golang-sync-cd5d95a43a6e_GH0.tar.gz) = 00a6dce4c1a9ca9edae6c3f1bedc0b15911c62681371ad9ed7738e182ba70393
|
||||
SIZE (golang-sync-cd5d95a43a6e_GH0.tar.gz) = 16956
|
||||
SHA256 (golang-sys-b09406accb47_GH0.tar.gz) = 732651ee709d3443e992f716796c5dac7cbc29a345a8ffe3fb80f505c93503d2
|
||||
SIZE (golang-sys-b09406accb47_GH0.tar.gz) = 1496780
|
||||
SHA256 (golang-sys-9fbb57f87de9_GH0.tar.gz) = 2f944b1fa3e7c040dc10ab2288ac7309d2ccab383337a4d9f77556e50589cb7c
|
||||
SIZE (golang-sys-9fbb57f87de9_GH0.tar.gz) = 1535108
|
||||
SHA256 (golang-text-v0.3.2_GH0.tar.gz) = 0b9309698f5708531c5377ab1e29b423a6d9e20c55a8d386c3b8283428212f22
|
||||
SIZE (golang-text-v0.3.2_GH0.tar.gz) = 7168069
|
||||
SHA256 (golang-time-9d24e82272b4_GH0.tar.gz) = 7452a7b879ee5984709b2165f6212ad9464977f06d440140b8690e61695aa404
|
||||
@ -155,6 +155,8 @@ SHA256 (kballard-go-shellquote-95032a82bc51_GH0.tar.gz) = dde336eb697f7f9c26cf6d
|
||||
SIZE (kballard-go-shellquote-95032a82bc51_GH0.tar.gz) = 4328
|
||||
SHA256 (konsorten-go-windows-terminal-sequences-v1.0.2_GH0.tar.gz) = e61f6422c7d1222c4c642b9134e5a4576a89ff651ef947487faa8ef33b6b4cfe
|
||||
SIZE (konsorten-go-windows-terminal-sequences-v1.0.2_GH0.tar.gz) = 1987
|
||||
SHA256 (kubernetes-sigs-sig-storage-lib-external-provisioner-v4.0.0_GH0.tar.gz) = a9ece536a3dcbb76f83d1eac094db8bd998a272baf3e4773278a81be2dfcf6b6
|
||||
SIZE (kubernetes-sigs-sig-storage-lib-external-provisioner-v4.0.0_GH0.tar.gz) = 51525
|
||||
SHA256 (kubernetes-sigs-yaml-v1.1.0_GH0.tar.gz) = 0ee3cfa6e0c3178df07213443ebac0d6ecc1178147f43f848ea7114acf621953
|
||||
SIZE (kubernetes-sigs-yaml-v1.1.0_GH0.tar.gz) = 14890
|
||||
SHA256 (kubernetes-api-v0.17.3_GH0.tar.gz) = d56b3cde8b8e5ac11436335775712d4a3074b546d573afdf955e1b9d48fe7194
|
||||
@ -277,5 +279,3 @@ SHA256 (xeipuuv-gojsonschema-1d523034197f_GH0.tar.gz) = 6e712a5d5fd646d217a24876
|
||||
SIZE (xeipuuv-gojsonschema-1d523034197f_GH0.tar.gz) = 64957
|
||||
SHA256 (zchee-go-vmnet-97ebf9174097_GH0.tar.gz) = 96c959880cf4f8572389347784a01753f7200aafd67c86b5737188380214a7a7
|
||||
SIZE (zchee-go-vmnet-97ebf9174097_GH0.tar.gz) = 4302
|
||||
SHA256 (kubernetes-sigs-sig-storage-lib-external-provisioner-v4.0.0_GH0.tar.gz) = a9ece536a3dcbb76f83d1eac094db8bd998a272baf3e4773278a81be2dfcf6b6
|
||||
SIZE (kubernetes-sigs-sig-storage-lib-external-provisioner-v4.0.0_GH0.tar.gz) = 51525
|
||||
|
@ -1,29 +0,0 @@
|
||||
--- pkg/minikube/constants/constants_freebsd.go.orig 2019-10-26 17:48:57 UTC
|
||||
+++ pkg/minikube/constants/constants_freebsd.go
|
||||
@@ -0,0 +1,26 @@
|
||||
+// +build freebsd, !gendocs
|
||||
+
|
||||
+/*
|
||||
+Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||
+
|
||||
+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 constants
|
||||
+
|
||||
+import (
|
||||
+ "k8s.io/client-go/util/homedir"
|
||||
+)
|
||||
+
|
||||
+// DefaultMountDir is the default mount dir
|
||||
+var DefaultMountDir = homedir.HomeDir()
|
@ -1,37 +0,0 @@
|
||||
--- pkg/minikube/driver/driver_freebsd.go.orig 2019-10-26 17:55:50 UTC
|
||||
+++ pkg/minikube/driver/driver_freebsd.go
|
||||
@@ -0,0 +1,34 @@
|
||||
+/*
|
||||
+Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||
+
|
||||
+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 driver
|
||||
+
|
||||
+import (
|
||||
+ "os/exec"
|
||||
+)
|
||||
+
|
||||
+// supportedDrivers is a list of supported drivers on Linux.
|
||||
+var supportedDrivers = []string{
|
||||
+ VirtualBox,
|
||||
+}
|
||||
+
|
||||
+func VBoxManagePath() string {
|
||||
+ cmd := "VBoxManage"
|
||||
+ if path, err := exec.LookPath(cmd); err == nil {
|
||||
+ return path
|
||||
+ }
|
||||
+ return cmd
|
||||
+}
|
@ -1,238 +0,0 @@
|
||||
--- third_party/go9p/ufs_freebsd.go.orig 2018-08-08 17:01:39 UTC
|
||||
+++ third_party/go9p/ufs_freebsd.go
|
||||
@@ -0,0 +1,235 @@
|
||||
+package go9p
|
||||
+
|
||||
+import (
|
||||
+ "fmt"
|
||||
+ "os"
|
||||
+ "os/user"
|
||||
+ "path"
|
||||
+ "strconv"
|
||||
+ "strings"
|
||||
+ "syscall"
|
||||
+ "time"
|
||||
+)
|
||||
+
|
||||
+func atime(stat *syscall.Stat_t) time.Time {
|
||||
+ return time.Unix(stat.Atimespec.Unix())
|
||||
+}
|
||||
+
|
||||
+// IsBlock reports if the file is a block device
|
||||
+func isBlock(d os.FileInfo) bool {
|
||||
+ stat := d.Sys().(*syscall.Stat_t)
|
||||
+ return (stat.Mode & syscall.S_IFMT) == syscall.S_IFBLK
|
||||
+ return true
|
||||
+}
|
||||
+
|
||||
+// IsChar reports if the file is a character device
|
||||
+func isChar(d os.FileInfo) bool {
|
||||
+ stat := d.Sys().(*syscall.Stat_t)
|
||||
+ return (stat.Mode & syscall.S_IFMT) == syscall.S_IFCHR
|
||||
+ return true
|
||||
+}
|
||||
+
|
||||
+func dir2Qid(d os.FileInfo) *Qid {
|
||||
+ var qid Qid
|
||||
+
|
||||
+ qid.Path = uint64(d.Sys().(*syscall.Stat_t).Ino)
|
||||
+ qid.Version = uint32(d.ModTime().UnixNano() / 1000000)
|
||||
+ qid.Type = dir2QidType(d)
|
||||
+
|
||||
+ return &qid
|
||||
+}
|
||||
+
|
||||
+func dir2Dir(path string, d os.FileInfo, dotu bool, upool Users) (*Dir, error) {
|
||||
+ if r := recover(); r != nil {
|
||||
+ fmt.Print("stat failed: ", r)
|
||||
+ return nil, &os.PathError{"dir2Dir", path, nil}
|
||||
+ }
|
||||
+ sysif := d.Sys()
|
||||
+ if sysif == nil {
|
||||
+ return nil, &os.PathError{"dir2Dir: sysif is nil", path, nil}
|
||||
+ }
|
||||
+ sysMode := sysif.(*syscall.Stat_t)
|
||||
+
|
||||
+ dir := new(ufsDir)
|
||||
+ dir.Qid = *dir2Qid(d)
|
||||
+ dir.Mode = dir2Npmode(d, dotu)
|
||||
+ dir.Atime = uint32(0 /*atime(sysMode).Unix()*/)
|
||||
+ dir.Mtime = uint32(d.ModTime().Unix())
|
||||
+ dir.Length = uint64(d.Size())
|
||||
+ dir.Name = path[strings.LastIndex(path, "/")+1:]
|
||||
+
|
||||
+ if dotu {
|
||||
+ dir.dotu(path, d, upool, sysMode)
|
||||
+ return &dir.Dir, nil
|
||||
+ }
|
||||
+
|
||||
+ unixUid := int(sysMode.Uid)
|
||||
+ unixGid := int(sysMode.Gid)
|
||||
+ dir.Uid = strconv.Itoa(unixUid)
|
||||
+ dir.Gid = strconv.Itoa(unixGid)
|
||||
+
|
||||
+ // BUG(akumar): LookupId will never find names for
|
||||
+ // groups, as it only operates on user ids.
|
||||
+ u, err := user.LookupId(dir.Uid)
|
||||
+ if err == nil {
|
||||
+ dir.Uid = u.Username
|
||||
+ }
|
||||
+ g, err := user.LookupId(dir.Gid)
|
||||
+ if err == nil {
|
||||
+ dir.Gid = g.Username
|
||||
+ }
|
||||
+
|
||||
+ /* For Akaros, we use the Muid as the link value. */
|
||||
+ if *Akaros && (d.Mode()&os.ModeSymlink != 0) {
|
||||
+ dir.Muid, err = os.Readlink(path)
|
||||
+ if err == nil {
|
||||
+ dir.Mode |= DMSYMLINK
|
||||
+ }
|
||||
+ }
|
||||
+ return &dir.Dir, nil
|
||||
+}
|
||||
+
|
||||
+func (dir *ufsDir) dotu(path string, d os.FileInfo, upool Users, sysMode *syscall.Stat_t) {
|
||||
+ u := upool.Uid2User(int(sysMode.Uid))
|
||||
+ g := upool.Gid2Group(int(sysMode.Gid))
|
||||
+ dir.Uid = u.Name()
|
||||
+ if dir.Uid == "" {
|
||||
+ dir.Uid = "none"
|
||||
+ }
|
||||
+
|
||||
+ dir.Gid = g.Name()
|
||||
+ if dir.Gid == "" {
|
||||
+ dir.Gid = "none"
|
||||
+ }
|
||||
+ dir.Muid = "none"
|
||||
+ dir.Ext = ""
|
||||
+ dir.Uidnum = uint32(u.Id())
|
||||
+ dir.Gidnum = uint32(g.Id())
|
||||
+ dir.Muidnum = NOUID
|
||||
+ if d.Mode()&os.ModeSymlink != 0 {
|
||||
+ var err error
|
||||
+ dir.Ext, err = os.Readlink(path)
|
||||
+ if err != nil {
|
||||
+ dir.Ext = ""
|
||||
+ }
|
||||
+ } else if isBlock(d) {
|
||||
+ dir.Ext = fmt.Sprintf("b %d %d", sysMode.Rdev>>24, sysMode.Rdev&0xFFFFFF)
|
||||
+ } else if isChar(d) {
|
||||
+ dir.Ext = fmt.Sprintf("c %d %d", sysMode.Rdev>>24, sysMode.Rdev&0xFFFFFF)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func (u *Ufs) Wstat(req *SrvReq) {
|
||||
+ fid := req.Fid.Aux.(*ufsFid)
|
||||
+ err := fid.stat()
|
||||
+ if err != nil {
|
||||
+ req.RespondError(err)
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ dir := &req.Tc.Dir
|
||||
+ if dir.Mode != 0xFFFFFFFF {
|
||||
+ mode := dir.Mode & 0777
|
||||
+ if req.Conn.Dotu {
|
||||
+ if dir.Mode&DMSETUID > 0 {
|
||||
+ mode |= syscall.S_ISUID
|
||||
+ }
|
||||
+ if dir.Mode&DMSETGID > 0 {
|
||||
+ mode |= syscall.S_ISGID
|
||||
+ }
|
||||
+ }
|
||||
+ e := os.Chmod(fid.path, os.FileMode(mode))
|
||||
+ if e != nil {
|
||||
+ req.RespondError(toError(e))
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ uid, gid := NOUID, NOUID
|
||||
+ if req.Conn.Dotu {
|
||||
+ uid = dir.Uidnum
|
||||
+ gid = dir.Gidnum
|
||||
+ }
|
||||
+
|
||||
+ // Try to find local uid, gid by name.
|
||||
+ if (dir.Uid != "" || dir.Gid != "") && !req.Conn.Dotu {
|
||||
+ uid, err = lookup(dir.Uid, false)
|
||||
+ if err != nil {
|
||||
+ req.RespondError(err)
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ // BUG(akumar): Lookup will never find gids
|
||||
+ // corresponding to group names, because
|
||||
+ // it only operates on user names.
|
||||
+ gid, err = lookup(dir.Gid, true)
|
||||
+ if err != nil {
|
||||
+ req.RespondError(err)
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if uid != NOUID || gid != NOUID {
|
||||
+ e := os.Chown(fid.path, int(uid), int(gid))
|
||||
+ if e != nil {
|
||||
+ req.RespondError(toError(e))
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if dir.Name != "" {
|
||||
+ fmt.Printf("Rename %s to %s\n", fid.path, dir.Name)
|
||||
+ // if first char is / it is relative to root, else relative to
|
||||
+ // cwd.
|
||||
+ var destpath string
|
||||
+ if dir.Name[0] == '/' {
|
||||
+ destpath = path.Join(u.Root, dir.Name)
|
||||
+ fmt.Printf("/ results in %s\n", destpath)
|
||||
+ } else {
|
||||
+ fiddir, _ := path.Split(fid.path)
|
||||
+ destpath = path.Join(fiddir, dir.Name)
|
||||
+ fmt.Printf("rel results in %s\n", destpath)
|
||||
+ }
|
||||
+ err := syscall.Rename(fid.path, destpath)
|
||||
+ fmt.Printf("rename %s to %s gets %v\n", fid.path, destpath, err)
|
||||
+ if err != nil {
|
||||
+ req.RespondError(toError(err))
|
||||
+ return
|
||||
+ }
|
||||
+ fid.path = destpath
|
||||
+ }
|
||||
+
|
||||
+ if dir.Length != 0xFFFFFFFFFFFFFFFF {
|
||||
+ e := os.Truncate(fid.path, int64(dir.Length))
|
||||
+ if e != nil {
|
||||
+ req.RespondError(toError(e))
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // If either mtime or atime need to be changed, then
|
||||
+ // we must change both.
|
||||
+ if dir.Mtime != ^uint32(0) || dir.Atime != ^uint32(0) {
|
||||
+ mt, at := time.Unix(int64(dir.Mtime), 0), time.Unix(int64(dir.Atime), 0)
|
||||
+ if cmt, cat := (dir.Mtime == ^uint32(0)), (dir.Atime == ^uint32(0)); cmt || cat {
|
||||
+ st, e := os.Stat(fid.path)
|
||||
+ if e != nil {
|
||||
+ req.RespondError(toError(e))
|
||||
+ return
|
||||
+ }
|
||||
+ switch cmt {
|
||||
+ case true:
|
||||
+ mt = st.ModTime()
|
||||
+ default:
|
||||
+ //at = time.Time(0)//atime(st.Sys().(*syscall.Stat_t))
|
||||
+ }
|
||||
+ }
|
||||
+ e := os.Chtimes(fid.path, at, mt)
|
||||
+ if e != nil {
|
||||
+ req.RespondError(toError(e))
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ req.RespondRwstat()
|
||||
+}
|
Loading…
Reference in New Issue
Block a user