Hi,

Minio has split the client bit out of the "main" package. It now resides at:
  
    https://github.com/minio/mc

This update does the same by moving the server/client parts out and just
having net/minio and net/minio-client.

I have done some limited testing via the web UI and via mc. Everything seems to
be working as expected.

net/minio changes ( https://deftly.net/patches/minio-0.20200227.diff ):
  - Roll a `go mod vendor`'d tarball - as the vendor directory upstream ships
    with seems to be out of date.
  - Change rc script to bind to 127.0.0.1:9000, add instructions in README
    about how to listen on everything. 
  - Add a patch to directio that allows us to build. OpenBSD open(2) lacks
    O_DIRECT so this is more of a workaround than anything.
  
net/minio-client:
  - poof'd into existence!

OK?

diff --git a/net/minio/Makefile b/net/minio/Makefile
index 838eddb60bb..1e518aa0113 100644
--- a/net/minio/Makefile
+++ b/net/minio/Makefile
@@ -1,7 +1,28 @@
-# $OpenBSD: Makefile,v 1.1.1.1 2017/12/23 21:19:39 landry Exp $
+# $OpenBSD: Makefile,v 1.34 2019/12/28 14:35:35 jasper Exp $
 
-SUBDIR =
-SUBDIR += client
-SUBDIR += server
+COMMENT =      object storage server compatible with Amazon S3 APIs
 
-.include <bsd.port.subdir.mk>
+V =            2020-02-27T00-23-05Z
+DISTNAME =     minio-RELEASE.${V}
+PKGNAME =      minio-0.${V:C/T.*//:S/-//g}
+
+CATEGORIES =   net sysutils
+
+HOMEPAGE =     https://minio.io
+
+# APACHEv2
+PERMIT_PACKAGE =       Yes
+
+WANTLIB +=     c pthread
+MODULES =      lang/go
+
+ALL_TARGET =   github.com/minio/minio
+
+MASTER_SITES = https://deftly.net/dist/
+
+MODGO_LDFLAGS +=  -X 
"github.com/minio/${GH_PROJECT}/cmd.Version=${V:C/T([0-9]+)-([0-9]+)-([0-9]+)/T\1:\2:\3/}"
 \
+               -X "github.com/minio/${GH_PROJECT}/cmd.ReleaseTag=${GH_TAGNAME}"
+
+SUBST_VARS =   VARBASE
+
+.include <bsd.port.mk>
diff --git a/net/minio/Makefile.inc b/net/minio/Makefile.inc
deleted file mode 100644
index 1cdb5dbc9f0..00000000000
--- a/net/minio/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.5 2019/12/28 14:35:35 jasper Exp $
-
-GH_ACCOUNT ?=  minio
-
-CATEGORIES =   net sysutils
-
-HOMEPAGE =     https://minio.io
-
-# APACHEv2
-PERMIT_PACKAGE =       Yes
-
-WANTLIB +=     c pthread
-MODULES =      lang/go
-
-MODGO_LDFLAGS +=  -X 
"github.com/minio/${GH_PROJECT}/cmd.Version=${V:C/T([0-9]+)-([0-9]+)-([0-9]+)/T\1:\2:\3/}"
 \
-               -X "github.com/minio/${GH_PROJECT}/cmd.ReleaseTag=${GH_TAGNAME}"
diff --git a/net/minio/client/Makefile b/net/minio/client/Makefile
deleted file mode 100644
index 784666b03b7..00000000000
--- a/net/minio/client/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# $OpenBSD: Makefile,v 1.23 2019/12/28 14:35:35 jasper Exp $
-
-COMMENT =      cli for minio
-
-V =            2019-03-20T21-29-03Z
-GH_PROJECT =   mc
-GH_TAGNAME =   RELEASE.${V}
-PKGNAME =      minioc-0.${V:C/T.*//:S/-//g}
-REVISION =     0
-
-post-install:
-       mv ${PREFIX}/bin/{mc,minioc}
-
-.include <bsd.port.mk>
diff --git a/net/minio/client/distinfo b/net/minio/client/distinfo
deleted file mode 100644
index 99be614ac14..00000000000
--- a/net/minio/client/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (mc-RELEASE.2019-03-20T21-29-03Z.tar.gz) = 
smH1BdMvX+FZUn1t5XDK/4Oh/miz/zmrJUgnXspYPd0=
-SIZE (mc-RELEASE.2019-03-20T21-29-03Z.tar.gz) = 3068226
diff --git a/net/minio/client/pkg/DESCR b/net/minio/client/pkg/DESCR
deleted file mode 100644
index 3fe5e666012..00000000000
--- a/net/minio/client/pkg/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-Minio Client (minioc) provides a modern alternative to UNIX commands like
-ls, cat, cp, mirror, diff, find etc. It supports filesystems and Amazon
-S3 compatible cloud storage service (AWS Signature v2 and v4).
diff --git a/net/minio/client/pkg/PLIST b/net/minio/client/pkg/PLIST
deleted file mode 100644
index 6fc156d52a7..00000000000
--- a/net/minio/client/pkg/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.1.1.1 2017/12/23 21:19:39 landry Exp $
-@bin bin/minioc
diff --git a/net/minio/distinfo b/net/minio/distinfo
new file mode 100644
index 00000000000..9ec3e519895
--- /dev/null
+++ b/net/minio/distinfo
@@ -0,0 +1,2 @@
+SHA256 (minio-RELEASE.2020-02-27T00-23-05Z.tar.gz) = 
V73mBIhVqrRwtYAeco8wglYyQZOnRmw0km7cY0j0sUs=
+SIZE (minio-RELEASE.2020-02-27T00-23-05Z.tar.gz) = 14384185
diff --git 
a/net/minio/patches/patch-vendor_github_com_ncw_directio_direct_io_openbsd_go 
b/net/minio/patches/patch-vendor_github_com_ncw_directio_direct_io_openbsd_go
new file mode 100644
index 00000000000..7503f39b2fd
--- /dev/null
+++ 
b/net/minio/patches/patch-vendor_github_com_ncw_directio_direct_io_openbsd_go
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+OpenBSD doesn't have O_DIRECT so just call regular open().
+
+Index: vendor/github.com/ncw/directio/direct_io_openbsd.go
+--- vendor/github.com/ncw/directio/direct_io_openbsd.go.orig
++++ vendor/github.com/ncw/directio/direct_io_openbsd.go
+@@ -0,0 +1,21 @@
++// Direct IO for Unix
++
++// +build openbsd
++
++package directio
++
++import (
++      "os"
++)
++
++const (
++      // Size to align the buffer to
++      AlignSize = 4096
++
++      // Minimum block size
++      BlockSize = 4096
++)
++
++func OpenFile(name string, flag int, perm os.FileMode) (file *os.File, err 
error) {
++      return os.OpenFile(name, flag, perm)
++}
diff --git a/net/minio/server/pkg/DESCR b/net/minio/pkg/DESCR
similarity index 100%
rename from net/minio/server/pkg/DESCR
rename to net/minio/pkg/DESCR
diff --git a/net/minio/server/pkg/PLIST b/net/minio/pkg/PLIST
similarity index 100%
rename from net/minio/server/pkg/PLIST
rename to net/minio/pkg/PLIST
diff --git a/net/minio/server/pkg/README b/net/minio/pkg/README
similarity index 90%
rename from net/minio/server/pkg/README
rename to net/minio/pkg/README
index bcf3619fa7c..259128fa011 100644
--- a/net/minio/server/pkg/README
+++ b/net/minio/pkg/README
@@ -12,8 +12,10 @@ at first startup in 
${VARBASE}/minio/export/.minio.sys/config/config.json. This
 file contains the randomly generated accessKey and secretKey tokens that should
 be used by minioc/S3-compatible clients to authenticate to the server.
 
-Its API/web interface is accessible by default on port 9000, listening on all
-network interfaces.
+Its API/web interface is accessible by default on port 9000, listening on 
+localhost. This can be changed by using rcctl:
+
+  # rcctl set minio flags ${VARBASE}/minio/export
 
 Bumping file limits
 ===================
diff --git a/net/minio/server/pkg/minio.rc b/net/minio/pkg/minio.rc
similarity index 74%
rename from net/minio/server/pkg/minio.rc
rename to net/minio/pkg/minio.rc
index 55227f4c146..b757a2f119e 100644
--- a/net/minio/server/pkg/minio.rc
+++ b/net/minio/pkg/minio.rc
@@ -3,7 +3,7 @@
 # $OpenBSD: minio.rc,v 1.2 2018/01/11 19:27:06 rpe Exp $
 
 daemon="${TRUEPREFIX}/bin/minio server"
-daemon_flags="${VARBASE}/minio/export"
+daemon_flags="--address 127.0.0.1:9000 ${VARBASE}/minio/export"
 daemon_user="_minio"
 
 . /etc/rc.d/rc.subr
diff --git a/net/minio/server/Makefile b/net/minio/server/Makefile
deleted file mode 100644
index c8a3dc18dbd..00000000000
--- a/net/minio/server/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# $OpenBSD: Makefile,v 1.34 2019/12/28 14:35:35 jasper Exp $
-
-COMMENT =      object storage server compatible with Amazon S3 APIs
-
-V =            2019-03-27T22-35-21Z
-GH_PROJECT =   minio
-GH_TAGNAME =   RELEASE.${V}
-PKGNAME =      minio-0.${V:C/T.*//:S/-//g}
-REVISION =     0
-
-SUBST_VARS =   VARBASE
-
-.include <bsd.port.mk>
diff --git a/net/minio/server/distinfo b/net/minio/server/distinfo
deleted file mode 100644
index 0208e4a106a..00000000000
--- a/net/minio/server/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (minio-RELEASE.2019-03-27T22-35-21Z.tar.gz) = 
+L6IZkygBu7hRZZq2QKWjN1ITk3ryLDFN6SJucQNb40=
-SIZE (minio-RELEASE.2019-03-27T22-35-21Z.tar.gz) = 9261176
diff --git 
a/net/minio/server/patches/patch-vendor_github_com_valyala_tcplisten_socket_bsd_go
 
b/net/minio/server/patches/patch-vendor_github_com_valyala_tcplisten_socket_bsd_go
deleted file mode 100644
index a1f6f4f7dd3..00000000000
--- 
a/net/minio/server/patches/patch-vendor_github_com_valyala_tcplisten_socket_bsd_go
+++ /dev/null
@@ -1,16 +0,0 @@
-$OpenBSD: patch-vendor_github_com_valyala_tcplisten_socket_bsd_go,v 1.1 
2018/08/30 08:31:02 jasper Exp $
-
-Renamed from socket_darwin.go and address:
-
-socket_other.go:11:40: undefined: syscall.SOCK_NONBLOCK
-socket_other.go:11:62: undefined: syscall.SOCK_CLOEXEC 
-
-Index: vendor/github.com/valyala/tcplisten/socket_bsd.go
---- vendor/github.com/valyala/tcplisten/socket_bsd.go.orig
-+++ vendor/github.com/valyala/tcplisten/socket_bsd.go
-@@ -0,0 +1,5 @@
-+// +build darwin openbsd
-+
-+package tcplisten
-+
-+var newSocketCloexec = newSocketCloexecOld
diff --git 
a/net/minio/server/patches/patch-vendor_github_com_valyala_tcplisten_socket_other_go
 
b/net/minio/server/patches/patch-vendor_github_com_valyala_tcplisten_socket_other_go
deleted file mode 100644
index c465fa1f5d9..00000000000
--- 
a/net/minio/server/patches/patch-vendor_github_com_valyala_tcplisten_socket_other_go
+++ /dev/null
@@ -1,14 +0,0 @@
-$OpenBSD: patch-vendor_github_com_valyala_tcplisten_socket_other_go,v 1.1 
2018/08/30 08:31:02 jasper Exp $
-
-socket_other.go:11:40: undefined: syscall.SOCK_NONBLOCK
-socket_other.go:11:62: undefined: syscall.SOCK_CLOEXEC 
-
-Index: vendor/github.com/valyala/tcplisten/socket_other.go
---- vendor/github.com/valyala/tcplisten/socket_other.go.orig
-+++ vendor/github.com/valyala/tcplisten/socket_other.go
-@@ -1,4 +1,4 @@
--// +build !darwin
-+// +build !darwin, !openbsd
- 
- package tcplisten
- 

-- 
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE

Attachment: minio-client.tgz
Description: Binary data

Reply via email to