Index | Thread | Search

From:
Daniel Jakots <danj@chown.me>
Subject:
Re: Update to minio-0.20241107
To:
Stuart Henderson <stu@spacehopper.org>
Cc:
ports@openbsd.org
Date:
Sun, 17 Nov 2024 10:57:56 -0500

Download raw body.

Thread
On Fri, 15 Nov 2024 09:34:47 +0000, Stuart Henderson
<stu@spacehopper.org> wrote:

> I'd put the package name first for quicker reading, and mention
> that it's just server:
> 
> <h3 id="r20241120">2024/11/20 - [packages] minio server: Removal of
> Gateway and filesystem modes</h3>

sure, modified locally

> > +<p>
> > +The last MinIO version supporting the MinIO is provided under the
> > package +<tt>minio-old</tt>.  
> 
> If you want to change the package stem you also need to deal with
> making sure the packages conflict. Also it's a bit different to other
> examples where we have multiple versions of a port in the tree.
> 
> Attached diff is a simpler approach keeping the same pkgstem, giving
> this:

Yes, the is-branch is a good idea!
 
> > 1. should minio and minio-old conflict? To migrate to the SNSD mode,
> > only the old version is enough, you don't need to have both.
> > Otherwise if we don't set a conflict marker I'll rename the
> > minio.rc to minio-old.rc I guess  
> 
> Yes I think so.

This is handled by the is-branch, isn't it?
Can't install minio-0.20241107 because of conflicts (minio-0.20221024p3)

> If you want to make sure that users do actually change it from the
> default, you could check that in the rc.d script,
> 
> getcap -f /etc/login.conf.d/minio:/etc/login.conf -c setenv minio

Indeed a
rc_pre() {
       getcap -f /etc/login.conf.d/minio:/etc/login.conf -c setenv minio
}
works as intended, however I'm afraid users will struggle to find out
why it doesn't start (we all know how much pkg/README are actually read
haha).

> And by providing the file, you can make sure it has sane permissions.

So how about this?

/usr/ports/net/minio$ cat server/pkg/minio.login
minio:\
	:openfiles-cur=4096:\
	:openfiles-max=8192:\
	:tc=daemon:
/usr/ports/net/minio$ cat server/pkg/README  
+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------

minio's root access
===================

By default, minio server use minioadmin:minioadmin as the user:password for the
root access. The only way to change the default user and/or password is
through the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD environment variables. On
OpenBSD, this can be achieved through ${SYSCONFDIR}/login.conf.d/minio:

minio:\
	:openfiles-cur=4096:\
	:openfiles-max=8192:\
	:setenv=MINIO_ROOT_USER=root,MINIO_ROOT_PASSWORD=yourstrongpassword:\
	:tc=daemon:


At this point, I believe a diff is too big to be useful so instead, I
attached the whole directory (/usr/ports/net$ tar cvzf minio.tgz minio)

Thanks!
Daniel