Date: Sat, 13 Jul 2019 08:32:01 +0000 (UTC) From: Matthias Fechner <mfechner@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r506517 - in head/devel/gitaly: . files Message-ID: <201907130832.x6D8W1rq000937@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mfechner Date: Sat Jul 13 08:32:01 2019 New Revision: 506517 URL: https://svnweb.freebsd.org/changeset/ports/506517 Log: Use the provided patch from upstream instead copying the file. Added: head/devel/gitaly/files/patch-pr1344.diff (contents, props changed) Modified: head/devel/gitaly/Makefile Modified: head/devel/gitaly/Makefile ============================================================================== --- head/devel/gitaly/Makefile Sat Jul 13 08:31:14 2019 (r506516) +++ head/devel/gitaly/Makefile Sat Jul 13 08:32:01 2019 (r506517) @@ -2,7 +2,7 @@ PORTNAME= gitaly DISTVERSION= 1.47.0 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= mfechner@FreeBSD.org @@ -48,50 +48,49 @@ GL_COMMIT= 333775253533ae4e9e9e66dc12b636821646551f USE_GITHUB= nodefault # generated with gomod-deps below GH_TUPLE= \ - BurntSushi:toml:v0.3.1:burntsushi_toml/vendor/github.com/BurntSushi/toml \ - DataDog:dd-trace-go:v1.7.0:datadog_dd_trace_go/vendor/gopkg.in/DataDog/dd-trace-go.v1 \ - beorn7:perks:v1.0.0:beorn7_perks/vendor/github.com/beorn7/perks \ - certifi:gocertifi:ee1a9a0726d2:certifi_gocertifi/vendor/github.com/certifi/gocertifi \ - cloudflare:tableflip:8392f1641731:cloudflare_tableflip/vendor/github.com/cloudflare/tableflip \ - codahale:hdrhistogram:3a0bb77429bd:codahale_hdrhistogram/vendor/github.com/codahale/hdrhistogram \ - davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ - getsentry:raven-go:v0.1.2:getsentry_raven_go/vendor/github.com/getsentry/raven-go \ - golang:crypto:c2843e01d9a2:golang_crypto/vendor/golang.org/x/crypto \ - golang:net:d8887717615a:golang_net/vendor/golang.org/x/net \ - golang:protobuf:v1.3.1:golang_protobuf/vendor/github.com/golang/protobuf \ - golang:sync:37e7f081c4d4:golang_sync/vendor/golang.org/x/sync \ - golang:sys:d0b11bdaac8a:golang_sys/vendor/golang.org/x/sys \ - golang:text:v0.3.0:golang_text/vendor/golang.org/x/text \ - google:go-genproto:bd91e49a0898:google_go_genproto/vendor/google.golang.org/genproto \ - grpc-ecosystem:go-grpc-middleware:v1.0.0:grpc_ecosystem_go_grpc_middleware/vendor/github.com/grpc-ecosystem/go-grpc-middleware \ - grpc-ecosystem:go-grpc-prometheus:v1.2.0:grpc_ecosystem_go_grpc_prometheus/vendor/github.com/grpc-ecosystem/go-grpc-prometheus \ - grpc:grpc-go:v1.16.0:grpc_grpc_go/vendor/google.golang.org/grpc \ - kelseyhightower:envconfig:v1.3.0:kelseyhightower_envconfig/vendor/github.com/kelseyhightower/envconfig \ - konsorten:go-windows-terminal-sequences:v1.0.1:konsorten_go_windows_terminal_sequences/vendor/github.com/konsorten/go-windows-terminal-sequences \ - libgit2:git2go:ecaeb7a21d47:libgit2_git2go/vendor/github.com/libgit2/git2go \ - lightstep:lightstep-tracer-go:v0.15.6:lightstep_lightstep_tracer_go/vendor/github.com/lightstep/lightstep-tracer-go \ - matttproud:golang_protobuf_extensions:v1.0.1:matttproud_golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \ - opentracing:opentracing-go:v1.0.2:opentracing_opentracing_go/vendor/github.com/opentracing/opentracing-go \ - philhofer:fwd:v1.0.0:philhofer_fwd/vendor/github.com/philhofer/fwd \ - pkg:errors:v0.8.0:pkg_errors/vendor/github.com/pkg/errors \ - pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ - prometheus:client_golang:v0.9.3:prometheus_client_golang/vendor/github.com/prometheus/client_golang \ - prometheus:client_model:fd36f4220a90:prometheus_client_model/vendor/github.com/prometheus/client_model \ - prometheus:common:v0.4.0:prometheus_common/vendor/github.com/prometheus/common \ - prometheus:procfs:5867b95ac084:prometheus_procfs/vendor/github.com/prometheus/procfs \ - sirupsen:logrus:v1.2.0:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ - stretchr:testify:v1.2.2:stretchr_testify/vendor/github.com/stretchr/testify \ - tinylib:msgp:v1.1.0:tinylib_msgp/vendor/github.com/tinylib/msgp \ - uber:jaeger-client-go:v2.15.0:uber_jaeger_client_go/vendor/github.com/uber/jaeger-client-go \ - uber:jaeger-lib:v1.5.0:uber_jaeger_lib/vendor/github.com/uber/jaeger-lib -GL_TUPLE= gitlab-org:labkit:0c3fc7cdd57c57da5ab474aa72b6640d2bdc9ebb:labkit/vendor/gitlab.com/gitlab-org/labkit \ - gitlab-org:gitaly-proto:f4db5d05d437abe1154d7308ca044d3577b5ccba:gitaly_proto/vendor/gitlab.com/gitlab-org/gitaly-proto + BurntSushi:toml:v0.3.1:burntsushi_toml/vendor/github.com/BurntSushi/toml \ + DataDog:dd-trace-go:v1.7.0:datadog_dd_trace_go/vendor/gopkg.in/DataDog/dd-trace-go.v1 \ + beorn7:perks:v1.0.0:beorn7_perks/vendor/github.com/beorn7/perks \ + certifi:gocertifi:ee1a9a0726d2:certifi_gocertifi/vendor/github.com/certifi/gocertifi \ + cloudflare:tableflip:8392f1641731:cloudflare_tableflip/vendor/github.com/cloudflare/tableflip \ + codahale:hdrhistogram:3a0bb77429bd:codahale_hdrhistogram/vendor/github.com/codahale/hdrhistogram \ + davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ + getsentry:raven-go:v0.1.2:getsentry_raven_go/vendor/github.com/getsentry/raven-go \ + golang:crypto:c2843e01d9a2:golang_crypto/vendor/golang.org/x/crypto \ + golang:net:d8887717615a:golang_net/vendor/golang.org/x/net \ + golang:protobuf:v1.3.1:golang_protobuf/vendor/github.com/golang/protobuf \ + golang:sync:37e7f081c4d4:golang_sync/vendor/golang.org/x/sync \ + golang:sys:d0b11bdaac8a:golang_sys/vendor/golang.org/x/sys \ + golang:text:v0.3.0:golang_text/vendor/golang.org/x/text \ + google:go-genproto:bd91e49a0898:google_go_genproto/vendor/google.golang.org/genproto \ + grpc-ecosystem:go-grpc-middleware:v1.0.0:grpc_ecosystem_go_grpc_middleware/vendor/github.com/grpc-ecosystem/go-grpc-middleware \ + grpc-ecosystem:go-grpc-prometheus:v1.2.0:grpc_ecosystem_go_grpc_prometheus/vendor/github.com/grpc-ecosystem/go-grpc-prometheus \ + grpc:grpc-go:v1.16.0:grpc_grpc_go/vendor/google.golang.org/grpc \ + kelseyhightower:envconfig:v1.3.0:kelseyhightower_envconfig/vendor/github.com/kelseyhightower/envconfig \ + konsorten:go-windows-terminal-sequences:v1.0.1:konsorten_go_windows_terminal_sequences/vendor/github.com/konsorten/go-windows-terminal-sequences \ + libgit2:git2go:ecaeb7a21d47:libgit2_git2go/vendor/github.com/libgit2/git2go \ + lightstep:lightstep-tracer-go:v0.15.6:lightstep_lightstep_tracer_go/vendor/github.com/lightstep/lightstep-tracer-go \ + matttproud:golang_protobuf_extensions:v1.0.1:matttproud_golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \ + opentracing:opentracing-go:v1.0.2:opentracing_opentracing_go/vendor/github.com/opentracing/opentracing-go \ + philhofer:fwd:v1.0.0:philhofer_fwd/vendor/github.com/philhofer/fwd \ + pkg:errors:v0.8.0:pkg_errors/vendor/github.com/pkg/errors \ + pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ + prometheus:client_golang:v0.9.3:prometheus_client_golang/vendor/github.com/prometheus/client_golang \ + prometheus:client_model:fd36f4220a90:prometheus_client_model/vendor/github.com/prometheus/client_model \ + prometheus:common:v0.4.0:prometheus_common/vendor/github.com/prometheus/common \ + prometheus:procfs:5867b95ac084:prometheus_procfs/vendor/github.com/prometheus/procfs \ + sirupsen:logrus:v1.2.0:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ + stretchr:testify:v1.2.2:stretchr_testify/vendor/github.com/stretchr/testify \ + tinylib:msgp:v1.1.0:tinylib_msgp/vendor/github.com/tinylib/msgp \ + uber:jaeger-client-go:v2.15.0:uber_jaeger_client_go/vendor/github.com/uber/jaeger-client-go \ + uber:jaeger-lib:v1.5.0:uber_jaeger_lib/vendor/github.com/uber/jaeger-lib +GL_TUPLE= \ + gitlab-org:gitaly-proto:f4db5d05d437abe1154d7308ca044d3577b5ccba:gitlab_org_gitaly_proto/vendor/gitlab.com/gitlab-org/gitaly-proto \ + gitlab-org:labkit:0c3fc7cdd57c57da5ab474aa72b6640d2bdc9ebb:gitlab_org_labkit/vendor/gitlab.com/gitlab-org/labkit - post-patch: ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/config.toml.example ${MV} ${WRKSRC}/config.toml.example ${WRKSRC}/config.toml.sample - ${CP} ${WRKSRC}/internal/helper/fstype/detect_linux.go ${WRKSRC}/internal/helper/fstype/detect_freebsd.go # Build the go deps, use `pkg install modules2tuple` gomod-deps: patch Added: head/devel/gitaly/files/patch-pr1344.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/gitaly/files/patch-pr1344.diff Sat Jul 13 08:32:01 2019 (r506517) @@ -0,0 +1,297 @@ +--- internal/helper/fstype/detect_darwin.go.orig 2019-06-18 09:53:31 UTC ++++ internal/helper/fstype/detect_darwin.go +@@ -1,15 +0,0 @@ +-package fstype +- +-// syscall should not be included in the linux package given that runs in +-// production. +-// See: https://docs.google.com/document/d/1QXzI9I1pOfZPujQzxhyRy6EeHYTQitKKjHfpq0zpxZs +-import "syscall" +- +-func statFileSystemType(path string) (int64, error) { +- var stat syscall.Statfs_t +- if err := syscall.Statfs(path, &stat); err != nil { +- return 0, err +- } +- +- return int64(stat.Type), nil +-} +--- internal/helper/fstype/detect_linux.go.orig 2019-06-18 09:53:31 UTC ++++ internal/helper/fstype/detect_linux.go +@@ -2,13 +2,106 @@ package fstype + + import "golang.org/x/sys/unix" + +-func statFileSystemType(path string) (int64, error) { ++func detectFileSystem(path string) string { + var stat unix.Statfs_t + if err := unix.Statfs(path, &stat); err != nil { +- return 0, err ++ return unknownFS + } + + // This explicit cast to int64 is required for systems where the syscall + // returns an int32 instead. +- return int64(stat.Type), nil ++ fsType, found := magicMap[int64(stat.Type)] ++ if !found { ++ return unknownFS ++ } ++ ++ return fsType + } ++ ++// This map has been collected from `man 2 statfs` and is non-exhaustive ++// The values of EXT2, EXT3, and EXT4 have been renamed to a generic EXT as their ++// key values were duplicate. This value is now called EXT_2_3_4 ++var ( ++ magicMap = map[int64]string{ ++ 0xadf5: "ADFS", ++ 0xadff: "AFFS", ++ 0x5346414f: "AFS", ++ 0x09041934: "ANON_INODE_FS", ++ 0x0187: "AUTOFS", ++ 0x62646576: "BDEVFS", ++ 0x42465331: "BEFS", ++ 0x1badface: "BFS", ++ 0x42494e4d: "BINFMTFS", ++ 0xcafe4a11: "BPF_FS", ++ 0x9123683e: "BTRFS", ++ 0x73727279: "BTRFS_TEST", ++ 0x27e0eb: "CGROUP", ++ 0x63677270: "CGROUP2", ++ 0xff534d42: "CIFS_NUMBER", ++ 0x73757245: "CODA", ++ 0x012ff7b7: "COH", ++ 0x28cd3d45: "CRAMFS", ++ 0x64626720: "DEBUGFS", ++ 0x1373: "DEVFS", ++ 0x1cd1: "DEVPTS", ++ 0xf15f: "ECRYPTFS", ++ 0xde5e81e4: "EFIVARFS", ++ 0x00414a53: "EFS", ++ 0x137d: "EXT", ++ 0xef51: "EXT2_OLD", ++ 0xef53: "EXT_2_3_4", ++ 0xf2f52010: "F2FS", ++ 0x65735546: "FUSE", ++ 0xbad1dea: "FUTEXFS", ++ 0x4244: "HFS", ++ 0x00c0ffee: "HOSTFS", ++ 0xf995e849: "HPFS", ++ 0x958458f6: "HUGETLBFS", ++ 0x9660: "ISOFS", ++ 0x72b6: "JFFS2", ++ 0x3153464a: "JFS", ++ 0x137f: "MINIX", ++ 0x138f: "MINIX2", ++ 0x2468: "MINIX2", ++ 0x2478: "MINIX22", ++ 0x4d5a: "MINIX3", ++ 0x19800202: "MQUEUE", ++ 0x4d44: "MSDOS", ++ 0x11307854: "MTD_INODE_FS", ++ 0x564c: "NCP", ++ 0x6969: "NFS", ++ 0x3434: "NILFS", ++ 0x6e736673: "NSFS", ++ 0x5346544e: "NTFS_SB", ++ 0x7461636f: "OCFS2", ++ 0x9fa1: "OPENPROM", ++ 0x794c7630: "OVERLAYFS", ++ 0x50495045: "PIPEFS", ++ 0x9fa0: "PROC", ++ 0x6165676c: "PSTOREFS", ++ 0x002f: "QNX4", ++ 0x68191122: "QNX6", ++ 0x858458f6: "RAMFS", ++ 0x52654973: "REISERFS", ++ 0x7275: "ROMFS", ++ 0x73636673: "SECURITYFS", ++ 0xf97cff8c: "SELINUX", ++ 0x43415d53: "SMACK", ++ 0x517b: "SMB", ++ 0x534f434b: "SOCKFS", ++ 0x73717368: "SQUASHFS", ++ 0x62656572: "SYSFS", ++ 0x012ff7b6: "SYSV2", ++ 0x012ff7b5: "SYSV4", ++ 0x01021994: "TMPFS", ++ 0x74726163: "TRACEFS", ++ 0x15013346: "UDF", ++ 0x00011954: "UFS", ++ 0x9fa2: "USBDEVICE", ++ 0x01021997: "V9FS", ++ 0xa501fcf5: "VXFS", ++ 0xabba1974: "XENFS", ++ 0x012ff7b4: "XENIX", ++ 0x58465342: "XFS", ++ } ++) +--- internal/helper/fstype/detect_openbsd.go.orig 2019-07-13 08:16:46 UTC ++++ internal/helper/fstype/detect_openbsd.go +@@ -0,0 +1,24 @@ ++package fstype ++ ++import "golang.org/x/sys/unix" ++ ++func detectFileSystem(path string) string { ++ var stat unix.Statfs_t ++ if err := unix.Statfs(path, &stat); err != nil { ++ return unknownFS ++ } ++ ++ var buf []byte ++ for _, c := range stat.F_fstypename { ++ if c == 0 { ++ break ++ } ++ buf = append(buf, byte(c)) ++ } ++ ++ if len(buf) == 0 { ++ return unknownFS ++ } ++ ++ return string(buf) ++} +--- internal/helper/fstype/detect_unix.go.orig 2019-07-13 08:16:46 UTC ++++ internal/helper/fstype/detect_unix.go +@@ -0,0 +1,26 @@ ++// +build darwin dragonfly freebsd ++ ++package fstype ++ ++import "golang.org/x/sys/unix" ++ ++func detectFileSystem(path string) string { ++ var stat unix.Statfs_t ++ if err := unix.Statfs(path, &stat); err != nil { ++ return unknownFS ++ } ++ ++ var buf []byte ++ for _, c := range stat.Fstypename { ++ if c == 0 { ++ break ++ } ++ buf = append(buf, byte(c)) ++ } ++ ++ if len(buf) == 0 { ++ return unknownFS ++ } ++ ++ return string(buf) ++} +--- internal/helper/fstype/fstype.go.orig 2019-06-18 09:53:31 UTC ++++ internal/helper/fstype/fstype.go +@@ -2,106 +2,7 @@ package fstype + + const unknownFS = "unknown" + +-// FileSystem will return the type of filesystem is being used at the passed path ++// FileSystem will return the type of filesystem being used at the passed path + func FileSystem(path string) string { +- kind, err := statFileSystemType(path) +- if err != nil { +- return unknownFS +- } +- +- fsType, ok := magicMap[kind] +- if !ok { +- return unknownFS +- } +- +- return fsType +- ++ return detectFileSystem(path) + } +- +-// This map has been collected from `man 2 statfs` and is non-exhaustive +-// The values of EXT2, EXT3, and EXT4 have been renamed to a generic EXT as their +-// key values were duplicate. This value is now called EXT_2_3_4 +-var ( +- magicMap = map[int64]string{ +- 0xadf5: "ADFS", +- 0xadff: "AFFS", +- 0x5346414f: "AFS", +- 0x09041934: "ANON_INODE_FS", +- 0x0187: "AUTOFS", +- 0x62646576: "BDEVFS", +- 0x42465331: "BEFS", +- 0x1badface: "BFS", +- 0x42494e4d: "BINFMTFS", +- 0xcafe4a11: "BPF_FS", +- 0x9123683e: "BTRFS", +- 0x73727279: "BTRFS_TEST", +- 0x27e0eb: "CGROUP", +- 0x63677270: "CGROUP2", +- 0xff534d42: "CIFS_NUMBER", +- 0x73757245: "CODA", +- 0x012ff7b7: "COH", +- 0x28cd3d45: "CRAMFS", +- 0x64626720: "DEBUGFS", +- 0x1373: "DEVFS", +- 0x1cd1: "DEVPTS", +- 0xf15f: "ECRYPTFS", +- 0xde5e81e4: "EFIVARFS", +- 0x00414a53: "EFS", +- 0x137d: "EXT", +- 0xef51: "EXT2_OLD", +- 0xef53: "EXT_2_3_4", +- 0xf2f52010: "F2FS", +- 0x65735546: "FUSE", +- 0xbad1dea: "FUTEXFS", +- 0x4244: "HFS", +- 0x00c0ffee: "HOSTFS", +- 0xf995e849: "HPFS", +- 0x958458f6: "HUGETLBFS", +- 0x9660: "ISOFS", +- 0x72b6: "JFFS2", +- 0x3153464a: "JFS", +- 0x137f: "MINIX", +- 0x138f: "MINIX2", +- 0x2468: "MINIX2", +- 0x2478: "MINIX22", +- 0x4d5a: "MINIX3", +- 0x19800202: "MQUEUE", +- 0x4d44: "MSDOS", +- 0x11307854: "MTD_INODE_FS", +- 0x564c: "NCP", +- 0x6969: "NFS", +- 0x3434: "NILFS", +- 0x6e736673: "NSFS", +- 0x5346544e: "NTFS_SB", +- 0x7461636f: "OCFS2", +- 0x9fa1: "OPENPROM", +- 0x794c7630: "OVERLAYFS", +- 0x50495045: "PIPEFS", +- 0x9fa0: "PROC", +- 0x6165676c: "PSTOREFS", +- 0x002f: "QNX4", +- 0x68191122: "QNX6", +- 0x858458f6: "RAMFS", +- 0x52654973: "REISERFS", +- 0x7275: "ROMFS", +- 0x73636673: "SECURITYFS", +- 0xf97cff8c: "SELINUX", +- 0x43415d53: "SMACK", +- 0x517b: "SMB", +- 0x534f434b: "SOCKFS", +- 0x73717368: "SQUASHFS", +- 0x62656572: "SYSFS", +- 0x012ff7b6: "SYSV2", +- 0x012ff7b5: "SYSV4", +- 0x01021994: "TMPFS", +- 0x74726163: "TRACEFS", +- 0x15013346: "UDF", +- 0x00011954: "UFS", +- 0x9fa2: "USBDEVICE", +- 0x01021997: "V9FS", +- 0xa501fcf5: "VXFS", +- 0xabba1974: "XENFS", +- 0x012ff7b4: "XENIX", +- 0x58465342: "XFS", +- } +-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907130832.x6D8W1rq000937>