Port mechanism explanation needed

Xim chenguokai17 at mails.ucas.ac.cn
Wed Mar 25 09:26:08 UTC 2020

> 在 2020年3月25日,上午3:53,Jackson Isaac <ijackson at macports.org> 写道:
> Hi Xim,
> On Tue, Mar 24, 2020 at 5:33 PM 陈国凯 <chenguokai17 at mails.ucas.ac.cn> wrote:
>> I found no maintainers for port stlink and I wanted to take it if possible.
>> However, I am quite confused with the portfile mechanism of this port.
>> After reading the wiki, I know that this portfile specifies a Github Repo from which the port system obtains source code. While there are two problems left for me.
>> 1. I tried editing portfile locally, changing the version number but port would only try fetching the source code from mirrors of MacPorts, rather than fetching directly from Github upstream. Is there a way for me to test my modifications locally? And how does the mirroring mechanism work? If one changed the portfile configuration and merged changes into port tree, would the mirrors be synced automatically?
> To fetch the source code/release tarball from upstream instead of
> mirrors, use the following command:
> sudo port -v fetch --no-mirror <portname>
> Once the Portfile is updated and merged into master, the mirrors start
> to pickup the latest Portfile (there might be delays involved before
> all mirrors are up to date).
>> 2. I cannot figure out to whom the checksums belongs. I downloaded all 1.6.0 source code from Github release page while none of them matches the checksum specified in the portfile. How can I obtain the file with the expected checksum from Github (not from mirrors because I intend to make an upgrade afterwhile so that I should find a way to configure checksum)
> The checksum you see on Github release page might have been computed
> using a different checksum algorithm.
> If you download and run the rmd160 and sha256 checksum on the package,
> then you should get the same checksum as mentioned in the portfile.
> To make this easy, when you update the Portfile you can run the
> following command
> sudo port -v checksum <portname>
> This will automatically calculate the correct checksum for the package
> downloaded from the upstream.
> Stay safe,
> Jackson Isaac

Hi Jackson,

I have figured out where the file comes from with the guidance of Rainer. After that the checksum works well. Thanks for your reply with additional information. :)

chenguokai17 at mails.ucas.ac.cn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20200325/8f109356/attachment.html>

More information about the macports-dev mailing list