I need an updated MinIO, but the Portfile is a direct GitHub fetch. How do I update it?

Ryan Schmidt ryandesign at macports.org
Tue Jan 28 01:17:56 UTC 2020


On Jan 27, 2020, at 15:09, Gerben Wierda wrote:

> What I like to know (I can of course file a ticket, but that gives me no way of knowing when it happens, so I prefer to do the update myself, test it and then produce a pull request)
> 
> The Portfile contains:
> 
>> # UPDATE THESE IN SYNC!
>> set version         2019-09-11T19-53-16Z
>> set commit          53e4887e02b94ed37dea8c5173330f17548fe122
>> 
>> set relversion      [regsub {(T..)-(..)-(..Z)} $version {\1:\2:\3}]
>> # This is not used for fetching, but is compiled into the executable
>> 
>> github.setup        minio minio $version RELEASE.
>> revision            0
>> 
>> homepage            https://minio.io
>> categories          www
>> maintainers         {eborisch @eborisch} openmaintainer
>> description         Open source Amazon S3-compatible object storage server.
>> long_description \
>>     ${description} It is best suited for storing unstructured data such as \
>>     photos, videos, log files, backups and container / VM images. Size of an \
>>     object can range from a few KBs to a maximum of 5TB. See also minio-mc \
>>     for command-line client.
>> license             Apache-2
>> 
>> checksums \
>>     rmd160  538b2615c7e043562b74d619e28e608adbafbdf2 \
>>     sha256  abfc96e02d1fed4fc0b3dd3e12885bf79e9bc3b33b42bd2fa0ae1023d58fc714 \
>>     size    6955992
> 
> I can find out what the set for version (github.com/minio/minio says RELEASE.2020-01-25T02-50-51Z)
> But what is  to be put in ’set commit’ and where can I find it?

Look on this page:

https://github.com/minio/minio/releases

Find the release you are interested in. Usually we want to use the one marked "Latest release", if the project does that. This project does, and it's the latest tag, RELEASE.2020-01-25T02-50-51Z. On the GitHub web site, there is not enough horizontal space to display the entire tag name, so it's cut off as "RELEASE.2020-0..." but you can hover over it to see the full tag in the URL. Below the truncated tag name, you'll see "a78e5d4". That's the truncated commit of that release's tag. We'd rather use full commits in MacPorts, not truncated ones; you can get the full commit by clicking on "a78e5d4" and now in the address bar and in the page you can see that the full commit is a78e5d4763dbb667540e6832c82bd3a9c4fc2118. That's what you paste into this port.


> I can then perform a fetch and calculate the checksums and I should be ready to go, right?

Sure.


> It looks to me (am I right?) with the set commit statement that direct access to github is used instead of downloading a tar somewher.

I would not expect that. "commit" is not a special variable name. It's just the name that the developer of this portfile chose to use for a variable. You can see later in the portfile how he chose to use that variable:

https://github.com/macports/macports-ports/blob/bec9373f900ef6dcee6c40946933f3f3952bbdb6/www/minio-mc/Portfile#L49-L50

It's just being passed to the build system. I expect that the program displays it at some point, perhaps when the user asks what version is installed.




More information about the macports-users mailing list